Blog

What is an email header? How to read one, with an example

What is an email header? Two-sentence answer, an annotated example, and how to read SPF, DKIM, DMARC, the delivery path and threading.

SendRaven7 min read

An email header is the block of metadata lines that sits before the body of a message. Your mail client and every server that touches the message write lines into it: who sent it, who it is for, how it traveled and whether it passed authentication.

The body is what the sender wrote. The header is what the servers wrote down. This guide gives you an annotated example, then shows the three things senders and developers actually read headers for: authentication, the delivery path and threading.

What is an email header?

Every message has two parts. The header comes first, then a blank line, then the body. The header is a list of Name: value lines.

You see a few of them every day:

  • From: who the message says it is from.
  • To: who it is addressed to.
  • Subject: the line you see in your inbox.
  • Date: when the sender's client says it was written.

Most fields stay hidden unless you ask for them:

  • Received: one line per server that handled the message.
  • Message-ID: a unique ID for this one message.
  • Authentication-Results: the SPF, DKIM and DMARC verdicts the receiving server wrote.
  • DKIM-Signature: a cryptographic signature added by the sending side.
  • Return-Path: where bounces go.

So no, the header is not the subject line. The subject is one field inside it.

An email header example, line by line

Below is an illustrative header. It is made up, on example.com, and it is not a real message. Real ones are longer and messier.

Return-Path: <bounce@mail.example.com>
Authentication-Results: mx.example.net;
  spf=pass smtp.mailfrom=mail.example.com;
  dkim=pass header.d=mail.example.com;
  dmarc=pass header.from=mail.example.com
Received: from mail.example.com (mail.example.com [203.0.113.25])
  by mx.example.net with ESMTPS; Tue, 02 Sep 2026 09:14:09 +0000
Received: from app-01.internal.example.com (app-01 [198.51.100.7])
  by mail.example.com with ESMTP; Tue, 02 Sep 2026 09:14:07 +0000
DKIM-Signature: v=1; a=rsa-sha256; d=mail.example.com; s=selector1;
  h=from:to:subject:date:message-id; bh=...; b=...
Message-ID: <a1b2c3@mail.example.com>
Date: Tue, 02 Sep 2026 09:14:07 +0000
From: Acme <billing@mail.example.com>
To: Ana <ana@example.org>
Subject: Your invoice for September
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8

Reading it is a bit of email archaeology, minus the trowel. Here is what each line means.

FieldPlain-English meaning
Return-PathThe envelope sender. Bounces go here. SPF checks this domain.
Authentication-ResultsThe verdict the receiving server reached on SPF, DKIM and DMARC.
Received (top)The last hop. The receiving server logged the message at 09:14:09.
Received (bottom)The first hop. The sender's own server logged it at 09:14:07.
DKIM-SignatureA signature over chosen fields. d= names the signing domain, s= the key selector.
Message-IDA unique ID for this message. Replies point back to it.
DateWhen the sender's client or server stamped the message.
FromThe address and name the recipient sees.
ToThe recipient.
SubjectThe subject line. Free text.
MIME-VersionSays the message uses MIME, the format for text, HTML and attachments.
Content-TypeThe body type and character set.

Note the order of the Received lines. They read bottom to top. Each server adds its line on top of the pile, so the oldest hop is at the bottom and the newest is at the top.

The header fields that matter most

You rarely need every line. Three jobs cover most reasons to open a header, plus one for bulk mail.

Authentication: SPF, DKIM and DMARC

Three checks decide whether a receiving server believes the sender.

  • SPF checks that the sending server is allowed to send for the Return-Path domain.
  • DKIM checks the signature in DKIM-Signature against a public key in DNS.
  • DMARC ties those to the From domain and tells receivers what to do when they don't line up.

The word to watch is aligned. A signature can pass and still not count. Alignment means the signing domain (d= in DKIM) or the Return-Path domain (for SPF) matches the domain in From. DMARC passes when at least one of the two passes and aligns.

The verdict lives in Authentication-Results. That is the header the receiving server wrote, so it is the result that server acted on.

Path: the Received chain

Each Received line is a hop: which server handed the message to which, and when. Read the chain bottom to top. Compare the timestamps on neighboring lines. A big gap means the message waited at that hop. Servers keep their own clocks, so treat small differences as noise.

Threading: Message-ID, In-Reply-To and References

Message-ID identifies one message. When someone replies, their client writes In-Reply-To with the ID of the message being answered. It also writes References with the chain of earlier IDs.

Message-ID: <d4e5f6@example.org>
In-Reply-To: <a1b2c3@mail.example.com>
References: <a1b2c3@mail.example.com>

Software builds a conversation from those headers, not from the subject line. SendRaven does the same: it joins inbound replies to the original message on Message-ID, never on subject. For the code view, read how email threads work in code.

Unsubscribe: List-Unsubscribe

Bulk and notification mail should carry a List-Unsubscribe header, which can power a one-click unsubscribe button in the mail client. The header is not the whole story. Gmail asks for a clearly visible unsubscribe link in the body as well, and the header button does not appear in every mail client. The List-Unsubscribe header generator builds the header and checks the parts.

How to find the full header in Gmail, Apple Mail and Outlook

Every client hides the header by default. Here is where it keeps it.

  • Gmail: open the message, open the three-dot menu and choose Show original.
  • Apple Mail: select the message, then choose View, Message, All Headers.
  • Outlook and other clients: menu names change between versions and platforms. The analyzer has a "where to find the headers" section that lists the steps.

Copy the whole block as text. Don't take a screenshot. A screenshot can't be parsed, and the line you need is always the one cut off at the bottom.

How to read a header: a five-minute checklist

  1. Check Authentication-Results. Look for spf, dkim and dmarc. Each should say pass.
  2. Check alignment. Compare the From domain with the DKIM d= domain and the Return-Path domain. They should match, or share the same organizational domain.
  3. Read the Received chain bottom to top. Find the hop with the biggest time gap.
  4. Look at threading. Read Message-ID, In-Reply-To and References. Do they point to the message you expect?
  5. Look for List-Unsubscribe on bulk or notification mail.

Or skip the squinting. Paste the headers into the email header analyzer. It reads the SPF, DKIM and DMARC results, whether the signature aligns with the From domain, the path the message took, where it waited and how it threads.

Want a fresh sample instead of an old message? Use the deliverability test to send one message to a temporary address and read how it arrived. It shows SPF, DKIM, DMARC, the spam verdict, TLS and the unsubscribe headers.

Header problems and what they usually mean

What you seeWhat it usually means
spf=fail or spf=softfailThe sending server isn't listed in the SPF record for the Return-Path domain. Fix the DNS record, then retest.
dkim=fail or no signatureThe message wasn't signed, or the signed content changed in transit. Check the DKIM record and the sending domain's setup.
dmarc=fail with SPF or DKIM passingNeither passing check is aligned with the From domain. Align the signing domain or Return-Path domain.
A large gap between two Received linesThe message waited at that hop. The server on the later line is the one to ask.
A reply landed outside its threadThe Message-ID or References chain was lost or rewritten somewhere along the way.

For the DMARC row, run the domain through the DMARC checker to see the policy it publishes.

One caution. A header tells you what happened to one message. It doesn't promise what will happen to the next one. Fix the cause, send again and read the new header.

What SendRaven does with headers

SendRaven is email infrastructure for AI agents, used over REST or its MCP server. Headers are part of the job in both directions.

  • Outbound: a transactional send to exactly one address (across to, cc and bcc) is treated as a notification. It gets a one-click List-Unsubscribe header and a short footer, "Stop these emails", that opts the recipient out of that topic only.
  • Inbound: replies are joined to the original message on Message-ID, with quoted history stripped from the text field (raw_text is the fallback). sender_authenticated reflects DMARC or aligned DKIM.
  • Identities: each domain has two sending identities, mail. for transactional and news. for campaigns, each with its own reputation.

That's the short version. The analyzer works on any message, whoever sent it.

FAQ

What is an email header? It is the block of metadata lines before the body of a message. It records who sent it, who it is for, how it traveled and whether it passed authentication.

Is the header of an email the same as the subject line? No. The subject is one field inside the header, next to From, To, Date and many others.

See the structured FAQ for short answers to the rest.

Read your own header

Paste your own headers into the free email header analyzer and read the SPF, DKIM, DMARC and threading results.

SendRaven is email infrastructure for AI agents. Start free.

  • what is an email header
  • email header
  • what are email headers
  • email header example
  • what is a header in email

SendRaven

Try it

Give your agent an inbox, an outbox, and a seatbelt.

3,000 emails a month free, and an MCP server your agent can use today.