Message basics Required
Send the headers every message needs
Give every message a From, a Date and a unique Message-ID, in the format RFC 5322 sets out.
How to do it
Let your mail library build the headers instead of writing them by hand. From names one mailbox on a domain you control. Date uses the RFC 5322 format with a time zone. Message-ID is globally unique, such as a random value at your own domain. Add Subject and To as well, since some filters score their absence.
Example
From: Example Shop <orders@example.com>
To: Ada Lovelace <ada@example.org>
Subject: Your order 1042 has shipped
Date: Tue, 20 Oct 2026 09:30:00 +0200
Message-ID: <7f3c9a2e-4b1d-4e8a-9c0f-1a2b3c4d5e6f@example.com>
How to check
Open a test message with "show original". From, Date, Message-ID, Subject and To each appear exactly once, and the Message-ID ends in your own domain.
For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers email playbook: https://agentwranglers.se/playbook/email/message-basics/required-headers.