As an email marketer, is there anything more panic-inducing than a support ticket with the subject line “I DIDN’T RECEIVE MY LOGIN CODE”?

Now, before you start blaming the spam folder (again), it helps to know that most of the time, the email will arrive. Just not fast enough.

Our own data backs this up. We measure delivery in real inboxes with Email Detective, a browser extension we built. Of about 261,000 emails sent through transactional email platforms since August 2026, 99.3% landed within 30 seconds of leaving the sending server - which is obviously great.

But about 4 in 1,000 took more than 5 minutes. About 1 in 1,000 took more than half an hour.

For a newsletter, that’s not a big deal. But for a login code or password reset, it’s not so great. After all, a code that shows up after it has expired is worse than no code at all.

Luckily, there is a relatively easy way for you to get to the bottom of why this may be happening - provided the user eventually receives the email. 

Every email carries a record of its own trip, within its very own header. Email headers show when the email was created, every server it passed through and when, and whether it passed the checks Gmail, Yahoo and Outlook run on every message.

So, as long as the user can forward the received email to you, you’ll be able to diagnose what’s really going on with those emails. In this guide, I’ll show you how to do exactly that.

Step 1: Get the headers

To see the headers, you’ll need a computer, as phone apps don’t show the full headers.

Luckily, every desktop app will show them if you ask:

  • Gmail: open the email, click the three dots ("More") next to "Reply", then "Show original".

  • Outlook on the web and the new Outlook: "More actions" > "View" > "View message details".

  • Apple Mail: "View" > "Message" > "Raw Source".

  • Yahoo Mail: the three dots, then "View Raw Message".

Now, here’s an important thing to remember: when a user complains, don't ask them to simply forward the email. A forward is a new email with new headers. Instead, ask them to copy the headers using the steps above, or to forward it as an attachment, which keeps the original intact.

What you'll get is a wall of text. It might look a little technical, but you actually only need three parts of it:

  1. The Received lines: the timeline.

  2. The Authentication-Results line: the checks.

  3. The Return-Path and DKIM-Signature lines: who's behind the email, and who vouched for it.

Step 2: Read the timeline, from the bottom up

Every server that handles an email adds a Received line to the top of the headers. So the newest line is at the top and the oldest is at the bottom. Reading them from the bottom up, you’ll be able to get a chronological picture of what happened.

Here's a shortened example. It's a login code that took more than four minutes:

Received: by 2002:a05:6a10:8f0c with SMTP id x12csp1093pxb;

        Mon, 16 Nov 2026 09:14:05 -0800 (PST)

Received: from mta1.example-sender.com (mta1.example-sender.com. [192.0.2.25])

        by mx.google.com with ESMTPS id 5a2e1c3b9f7d

        for <[email protected]>;

        Mon, 16 Nov 2026 09:14:03 -0800 (PST)

Received: from app-server-3 (10.0.0.12)

        by mta1.example-sender.com with ESMTP;

        Mon, 16 Nov 2026 17:09:51 +0000

Date: Mon, 16 Nov 2026 17:09:50 +0000

First, watch the time zones. The bottom lines are in UTC (+0000). Gmail's lines are in Pacific time (-0800). That's the easiest mistake to make: convert everything to one time zone before you compare. 09:14:03 Pacific is 17:14:03 UTC.

Now the gaps:

Step

Time

Gap

Your app creates the email (Date)

17:09:50

The sending server accepts it

17:09:51

1 second

Gmail's server receives it

17:14:03

4 minutes 12 seconds

Gmail puts it in the inbox

17:14:05

2 seconds

So the email didn't get stuck at Gmail. It got stuck between the sending server and Gmail.

Here's what each kind of gap usually means:

  • Between Date and the first Received line: the delay is in your own app, before the email left. This could be because of busy job queues, slow API calls or retry loops.

  • Between the sending server and the inbox provider's first line: the email waited at the sending end. Either the sending platform queued it or the receiving server said "try again later" and the sender had to retry. The headers can't tell you which, but your sending platform's logs can: look for deferrals or 4xx responses for that message.

  • Between two lines from the inbox provider: the provider held the email, for example while scanning it. You can't fix that directly. Keeping your sender reputation clean is what helps.

Two more things. Server clocks can be a few seconds off, so ignore gaps of a second or two, even negative ones. And don't panic over 10 or 20 seconds. Of the roughly 261,000 emails we mentioned earlier, 99.3% arrived within 30 seconds of leaving the sending server. If your gaps add up to minutes, though, something's off.

Step 3: Check the authentication results

A fast email that lands in spam isn't much better than a slow one. So next, find the line that starts with Authentication-Results.

The receiving server writes this line. That makes it the inbox provider's verdict, not the sender's claim. Here's what a healthy one looks like:

Authentication-Results: mx.google.com;

       dkim=pass [email protected] header.s=s1;

       spf=pass (google.com: domain of [email protected]

         designates 192.0.2.25 as permitted sender)

         [email protected];

       dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=yourapp.com

Three checks, in plain English:

  • SPF asks: is this server allowed to send for this domain? It checks the bounce address (the Return-Path), not the From address your user sees.

  • DKIM asks: was the email signed, and did it arrive unchanged? The domain after header.i= or d= tells you who signed it.

  • DMARC asks: did SPF or DKIM pass for the domain in the From line? It also tells the inbox what to do when they don't: nothing (p=none), the spam folder (p=quarantine) or a bounce (p=reject).

Just note: DKIM can pass while DMARC fails. That happens when the email is signed with the sending platform's domain instead of yours. The signature is valid. It just doesn't match your From address. So check that the DKIM domain is your own domain, or a subdomain of it.

What failures look like:

  • spf=softfail or spf=fail: the sending server isn't in your SPF record. Common right after you switch platforms or add a new one.

  • dkim=none: there's no signature. DKIM isn't set up for that sending domain.

  • dkim=fail (body hash did not verify): the email changed after it was signed. Mailing lists and some forwarding setups do this.

  • dmarc=fail: neither SPF nor DKIM passed for your From domain. With p=reject, the email may never show up at all.

This matters more than it used to. Since 2024, Gmail and Yahoo have required bulk senders to have SPF, DKIM and DMARC in place, plus one-click unsubscribe on marketing email. Microsoft brought in similar rules for Outlook.com in May 2025. Login codes and receipts don't need an unsubscribe link, but they do need to pass authentication.

As we’ve observed, plenty of senders still aren't there. Of 61,743 brands whose emails Email Detective readers received, only 49% enforce DMARC (28% reject, 21% quarantine). Another 40% only monitor with p=none, and 10% have no DMARC record at all. One-click unsubscribe is further along: 75% of 51,676 brands offer it. (These are our latest figures as of November 2026.)

Step 4: Keep codes away from campaigns

If your login codes and your newsletter leave from the same domain and the same servers, they share a reputation. They may share a queue too.

For example, imagine if you send a newsletter to 50,000 people at 9am. At 9:02, someone asks for a password reset. If the reset sits in the same queue, it has to wait its turn. And if Gmail or Outlook start slowing down mail from your domain, maybe because a lot arrived at once or people hit "report spam" on the newsletter, that slowdown doesn't care which emails were urgent.

The fix is simple, but it works:

  • Send transactional email (codes, resets, receipts) from its own subdomain, like mail.yourapp.com. Send marketing from another, like news.yourapp.com.

  • Give each subdomain its own SPF and DKIM setup.

  • If your sending platform supports separate streams or separate sending IPs for transactional and marketing mail, use them.

It won't make every email instant, but at the very least, a newsletter problem will remain a newsletter-only problem.

The headers will show you whether you’ve set this up or not. Open one of your login codes and one of your newsletters side by side. Compare three things: the sending IP address (in Gmail, it's in brackets on the line that says "by mx.google.com"), the DKIM domain and the Return-Path. If all three match, it means your codes and your campaigns share everything.

Cheat sheet: the lines that matter

Header

What it tells you

What you want to see

Date

When your app created the email

Within a second or two of the first Received line

Received (bottom)

When the sending server accepted it

Received (top)

When the inbox provider got it and delivered it

Seconds, not minutes, after the bottom line

Authentication-Results

The inbox provider's verdict on SPF, DKIM and DMARC

pass, pass, pass

DKIM-Signature (d=)

Which domain signed the email

Your own domain or a subdomain of it

Return-Path

The bounce address SPF checks

Your own domain or a subdomain of it

List-Unsubscribe-Post

One-click unsubscribe

On marketing email; not needed on codes and receipts

The 10-second version

Reading headers by hand is worth doing at least once to help you understand what's going on. But doing it every time means a lot of squinting at timestamps and time zones.

To save yourself some time, paste the headers into our free email header analyzer and let it do the reading. It shows how long the email spent at each server, explains SPF, DKIM and DMARC in plain English, names the email platform that sent it, and checks the email against Gmail's and Yahoo's sender rules.

If you'd rather skip the copy and paste, Email Detective runs the same kind of checks inside Gmail and Outlook on the web. It's a free extension for Chrome and Edge. Open any email and it shows which platform sent it, whether it passed authentication, and how long it took to arrive.

Next time a user says "I never got the code", you won't have to guess. The answer is in the headers.