Mandatory Email Headers or How to Send Email (into Spam)

By Nikita Chernyi

Originally published on 2022-11-12 at /posts/how-to-send-email-into-spam/; republished here on 2026-09-23 with links updated.

Hey, It’s time to compose and send the first valid email message!

First of all, there are several mandatory headers and without any of them your email will be rejected:

Additionally, there are some headers, mandatory only in case of email threads (if you don’t provide them an email will be valid, but an email thread - will not):

Here is an example of a fully valid email

MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8BIT
From: your-email-sender@your-server.com
To: some@example.com
Message-Id: <some-random-string@your-server.com>
Date: Sat, 12 Nov 2022 19:13:27 +0000
Subject: A fully valid email example

That will go straight into the Spam dir of your mailbox!
llms.txt