What Are Email Headers
Every email message carries a set of headers — structured metadata attached to the top of the message. Most email clients hide headers from view, but they play a critical role in how email is routed, authenticated, and displayed. Headers tell receiving servers where the message came from, how to verify its authenticity, where to send replies, and how to render the content. Understanding headers is essential for diagnosing delivery problems, verifying authentication, and building reliable sending workflows.Headers are added at multiple stages of an email’s journey. Some are set by the sender (you, via the Lettr API), some are added by Lettr’s sending infrastructure, and some are appended by each server that handles the message along the way.
Essential Headers
These headers appear on virtually every email message.| Header | Description | Example Value | Who Sets It |
|---|---|---|---|
| From | The sender’s display address | hello@yourapp.com | You, via the Lettr API from parameter |
| To | The recipient’s address | user@example.com | You, via the API to parameter |
| Subject | The email subject line | Your invoice is ready | You, via the API subject parameter |
| Date | Timestamp of when the email was sent | Tue, 28 Jan 2026 14:30:00 +0000 | Lettr, at send time |
| Message-ID | A globally unique identifier for the message | <abc123@mail.yourapp.com> | Lettr |
| MIME-Version | MIME protocol version | 1.0 | Lettr |
| Content-Type | Format of the message body | multipart/alternative; boundary="..." | Lettr, based on the content you provide |
Routing and Authentication Headers
These headers control how the message is delivered and whether it passes authentication checks.Return-Path
The envelope sender address, also known as the bounce address. When a message bounces, the bounce notification is sent to this address. Lettr sets the Return-Path automatically to capture and process bounces on your behalf.Received
Each mail server that handles the message appends aReceived header. Reading these from bottom to top traces the path the email took from sender to recipient.
DKIM-Signature
A cryptographic signature added by Lettr that allows the receiving server to verify the message was not altered in transit and was authorized by the sending domain.Authentication-Results
Added by the receiving server after evaluating SPF, DKIM, and DMARC. This header tells you whether your message passed or failed each check.Display and Reply Headers
These headers affect what the recipient sees in their email client and where replies are directed.Reply-To
Specifies the address that receives replies. If omitted, replies go to theFrom address. In Lettr, set this with the reply_to API parameter.
From Name
The display name shown alongside the sender address. Set via thefrom_name API parameter in Lettr.
List-Unsubscribe
Provides mailbox providers with a machine-readable unsubscribe mechanism. This header is important for deliverability — Gmail and other providers surface it as a visible unsubscribe link in the inbox UI.List-Unsubscribe-Post
Works together with List-Unsubscribe to enable RFC 8058 one-click unsubscribe. This allows mailbox providers to process unsubscribe requests with a single POST request, without requiring the recipient to visit a webpage.Lettr automatically adds
List-Unsubscribe and List-Unsubscribe-Post headers when you configure unsubscribe handling for your sending domain. Both headers are strongly recommended for bulk and marketing email.Custom Headers
Lettr supports custom headers via theheaders API parameter. Custom headers use the X- prefix by convention and are passed through to webhook payloads, making them useful for internal tracking.
Common use cases:
- Internal tracking — attach an internal reference ID to correlate emails with your application records.
- Correlation IDs — pass a request or transaction ID through the email pipeline for end-to-end observability.
How to View Email Headers
Most email clients hide headers by default. Here is how to reveal them in common clients:| Email Client | How to View Headers |
|---|---|
| Gmail | Open the message, click the three-dot menu, select Show original |
| Outlook (Web) | Open the message, click the three-dot menu, select View > View message source |
| Apple Mail | Open the message, go to View > Message > All Headers |
| Thunderbird | Open the message, go to View > Message Source (or press Ctrl+U) |
Reading Authentication Results
When diagnosing delivery issues, theAuthentication-Results header is the most important header to check. Here is an example of a fully passing result and what each line means:
| Line | Meaning |
|---|---|
spf=pass | The sending IP address is authorized by the domain’s SPF record. Lettr’s IPs are covered when you add the required SPF include to your DNS. |
dkim=pass | The DKIM signature is valid. The message was signed by Lettr using the key published at lettr._domainkey.yourapp.com and was not modified in transit. |
dmarc=pass | The message aligns with the domain’s DMARC policy. Both SPF and/or DKIM passed and the domains align with the From header. |
Troubleshooting with Headers
DKIM is failing
DKIM is failing
A
dkim=fail result means the cryptographic signature could not be verified. Common causes:- Missing DKIM DNS record — Ensure the CNAME record for
lettr._domainkey.yourapp.comis published and has propagated. - Message modified in transit — Forwarding services or mailing lists may alter the message body, breaking the signature.
- Wrong signing domain — The
d=value in the DKIM-Signature must match your verified sending domain in Lettr.
SPF is failing
SPF is failing
A
spf=fail result means the sending IP is not authorized by your domain’s SPF record. Common causes:- Missing Lettr include — Your SPF record must contain
include:spf.lettr.com. Without it, Lettr’s sending IPs are not authorized. - Too many DNS lookups — SPF allows a maximum of 10 DNS lookups. If your record exceeds this limit, SPF evaluation stops and may return
permerror. - Incorrect Return-Path domain — SPF is evaluated against the Return-Path (envelope sender) domain, not the From header domain.
Wrong From display name or address
Wrong From display name or address
If the recipient sees an unexpected sender name or address:
- Check the
fromandfrom_nameparameters in your API request. Thefrommust be an address on a verified domain in Lettr. - Some email clients show the envelope sender — If the Return-Path domain differs from the From domain and DMARC is not aligned, some clients may display a “via” label (e.g., “via lettr.com”).
- Verify domain alignment — Setting up a custom Return-Path domain in Lettr removes the “via” label.
Replies are going to the wrong address
Replies are going to the wrong address
If replies are not reaching the expected inbox:
- Check the Reply-To header — If set, replies go to the Reply-To address, not the From address. Verify the
reply_toparameter in your API request. - Reply-To not set — If you omit
reply_to, replies default to the From address. Make sure the From address has a working mailbox or forwarding rule. - Multiple Reply-To addresses — The Reply-To header supports only one address. If you need replies routed to multiple people, use a shared mailbox or alias.