# Email headers

> What the common email headers do, from From and Reply-To to DKIM-Signature and List-Unsubscribe, and which ones Emailit adds, rewrites or removes when it sends.

Headers are the `Name: value` lines at the top of every email. They carry the sender, recipients, subject, routing history and authentication results. This page explains the headers you're most likely to inspect or set, and what Emailit does with each one when it sends your mail.

## Envelope and headers

An email has two sets of addresses, and they don't have to match:

| | Envelope | Headers |
|---|---|---|
| Sender | `MAIL FROM`, the bounce address. Emailit sets it to your [return path](/docs/domains/dns-records/), an address on `emailit.yourdomain.com`. | `From`, the address recipients see. You set it. |
| Recipients | `RCPT TO`, where the server actually delivers. | `To` and `Cc`, which recipients see. `Bcc` is never shown. |

Receivers check [SPF](/docs/dictionary/dns-records/#spf) against the envelope sender and [DKIM](/docs/dictionary/dns-records/#dkim) against the signature, then DMARC checks that at least one of those domains aligns with the `From` header.

## How to set headers

- **Email API.** Use the `from`, `to`, `cc`, `bcc`, `reply_to` and `subject` fields, and pass any other header in the `headers` object. See [Headers and metadata](/docs/email-api/headers-and-metadata/).
- **SMTP.** Emailit sends the MIME message your app submits, with the changes listed below. See [SMTP headers](/docs/smtp/headers/).

## Header reference

The **Emailit** column tells you whether Emailit adds, rewrites or removes the header, or leaves it to you.

### Addresses and subject

| Header | Purpose | Emailit |
|---|---|---|
| `From` | The author's address and display name, shown to recipients. | You set it. It must use a verified sending domain of the workspace, matched case-insensitively. Otherwise the API returns `422` and SMTP returns `530`. |
| `Sender` | The address that actually sent the message when it differs from `From`, for example an assistant sending for a manager. | Passed through unchanged. Emailit checks only `From`. |
| `Reply-To` | Where replies go instead of the `From` address. | You set it. Emailit removes it when it contains the same addresses as `From`, because spam filters penalize that. |
| `To` | Primary recipients, as shown to everyone. | You set it. Each recipient gets a separate copy with its own email ID. |
| `Cc` | Visible copy recipients. | You set it. Each recipient gets a separate copy. |
| `Bcc` | Hidden copy recipients. | Removed from the message before delivery. Bcc recipients still get their copy. |
| `Subject` | The subject line. | You set it. Emailit encodes non-ASCII characters (RFC 2047) so accents and non-Latin scripts display correctly. |
| `Date` | When the message was written. | Set by Emailit to the time it sends the message. |

### Identification and threading

| Header | Purpose | Emailit |
|---|---|---|
| `Message-ID` | A globally unique ID for the message, in the form `<id@domain>`. | Set by Emailit to an ID on your sending domain, replacing any value you send. The API returns it as `message_id`. |
| `In-Reply-To` | The `Message-ID` of the message being replied to. Mail clients use it to thread conversations. | Passed through. Set it with the `headers` field or in your MIME. |
| `References` | The chain of `Message-ID` values in a thread. | Passed through. |

### Routing and trace

| Header | Purpose | Emailit |
|---|---|---|
| `Return-Path` | The envelope sender, normally added by the receiving server at final delivery. | Set by Emailit to an address on `emailit.yourdomain.com`, so bounces reach Emailit and SPF is checked against your domain. You can't change it. |
| `Received` | One line per server the message passed through, newest first. Useful for tracing delays. | Added by Emailit's API or SMTP relay and by its MTA. The SMTP relay rejects a message with `550 Loop detected` after more than 4 passes through it. |

### MIME structure

| Header | Purpose | Emailit |
|---|---|---|
| `MIME-Version` | Declares the message uses MIME, always `1.0`. | Generated by the API. Passed through over SMTP. |
| `Content-Type` | The type of the body or part, such as `text/html`, `multipart/alternative` or `multipart/mixed`, and its character set. | Generated by the API from `html`, `text` and `attachments`. Passed through over SMTP. |
| `Content-Transfer-Encoding` | How a part is encoded for transport, such as `quoted-printable`, `base64` or `7bit`. | Generated by the API. Passed through over SMTP. |

### Authentication

| Header | Purpose | Emailit |
|---|---|---|
| `DKIM-Signature` | A cryptographic signature over the body and selected headers, checked against the public key in DNS. | Added by Emailit with `d=` set to your domain and the `emailit` selector, plus a second signature for `emailitmail.com` that mailbox providers use for feedback loops. |
| `Authentication-Results` | The receiving server's SPF, DKIM and DMARC verdicts. | Added by the recipient's server, not by Emailit. Read it in the recipient's copy to debug authentication. |
| `ARC-Seal`, `ARC-Message-Signature`, `ARC-Authentication-Results` | Authenticated Received Chain: forwarders and mailing lists record the authentication results they saw, so later servers can trust them. | Not added by Emailit. Added by intermediaries that forward your mail. |

### Lists and automated mail

| Header | Purpose | Emailit |
|---|---|---|
| `List-Unsubscribe` | A `mailto:` or `https:` link that lets mailbox providers show an unsubscribe button. | Added to every [campaign](/docs/campaigns/) email, pointing to the hosted unsubscribe page. For API or SMTP mail, add your own with the `headers` field or in your MIME. |
| `List-Unsubscribe-Post` | Set to `List-Unsubscribe=One-Click` to allow one-click unsubscribe (RFC 8058). Gmail and Yahoo require it for bulk mail. | Added to every campaign email together with `List-Unsubscribe`. |
| `Feedback-ID` | An identifier mailbox providers include in complaint data so senders can group it. | Added by Emailit to every message, in the form `:campaign-id:workspace-id:Emailit`. |
| `Precedence` | An older hint such as `bulk` or `list` that some auto-responders respect. | Not added. You can set it yourself. |
| `Auto-Submitted` | Marks a message as automatically generated, for example `auto-generated` or `auto-replied`, so other systems don't reply to it. | Not added. Set it on automated replies to prevent mail loops. |

### Emailit headers

| Header | Purpose | Emailit |
|---|---|---|
| `X-Emailit-ID` | The email's internal token. Emailit uses it to match bounce messages to the original email. | Added to every message. Don't remove it if you relay Emailit mail through another system. |
| `X-Emailit-Tag` | A legacy header for tagging emails. | Not read by Emailit. It's passed through like any custom header. |
| `X-Emailit-Meta` | The email's [metadata](/docs/email-api/headers-and-metadata/), base64-encoded. | Added by the API when you send `meta`. It stays in the delivered message, so don't put secrets in metadata. |
| `X-Emailit-Tracking` | The email's open and click tracking settings. | Added by the API when you enable tracking for a send. |

> **Emailit doesn't read custom SMTP headers:** Over SMTP, Emailit doesn't interpret `X-Emailit-*` headers. Open and click tracking follow the sending domain's settings, and there's no server-side templating. To control tracking per email, use the [Email API](/docs/email-api/send-email/).

## Related

- [Headers and metadata](/docs/email-api/headers-and-metadata/)
- [SMTP headers](/docs/smtp/headers/)
- [DNS records](/docs/dictionary/dns-records/)
- [Unsubscribes](/docs/audiences/unsubscribes/)

---
Source: https://emailit.com/docs/dictionary/email-headers/
