OTP emails not arriving or landing in spam: 7 causes and fixes

· 3 min read

Customers say they never got the OTP, or the verification email went to spam. Here are the most common causes and how to fix each one, from SPF, DKIM and DMARC to a slow sending queue.

OTP emails landing in spam: how to get them into the inbox

A one-time code that arrives late or ends up in spam means a failed signup and another support ticket. Most of the causes are configuration problems you can fix without rebuilding anything.

First check: not delivered, or delivered to spam?

The two problems have different fixes. Look up the message in your email provider's log. If the receiving server accepted it (delivered), it reached the mailbox but was filtered into spam. If it bounced, it was rejected, and the bounce message usually says why.

1. No SPF, or SPF doesn't match your domain

SPF tells receivers which servers may send mail for your domain. If it is missing, or you send through a provider that isn't covered, Gmail treats the mail as suspicious. Modern email providers ask you to add a CNAME for a return path (for example send.yourdomain.com) so SPF passes on your own domain.

2. DKIM isn't signed with your own domain

DKIM is a digital signature in the email header. If the signature belongs to your provider's domain instead of yours, DMARC fails. Add the TXT record your provider gives you, then check that outgoing mail carries d=yourdomain.

3. No DMARC record

Since 2024 Gmail and Yahoo require bulk senders to publish DMARC. Start with p=none to collect reports, then move to quarantine or reject once you are sure all your real mail passes.

_dmarc.example.com  TXT  "v=DMARC1; p=none; rua=mailto:[email protected]"

4. Sending from a free mailbox such as @gmail.com

An app that sends with From: [email protected] through another server fails Gmail's DMARC almost every time. Use your company domain, for example [email protected], and verify that domain before sending.

5. OTPs stuck behind a newsletter

If one system sends both a marketing campaign of tens of thousands of emails and your OTPs through the same queue, the codes wait until they expire. Keep transactional mail on a separate lane from bulk mail. Bytesms does this automatically: broadcasts and emails that repeat the same subject many times go through the bulk lane, while OTPs use the regular one.

6. The content looks like spam

  • Only an image, no text, or no text/plain part
  • Shortened links (bit.ly) or links to domains unrelated to the sender
  • Subject in all caps, several exclamation marks
  • A good OTP email is short: the service name, the code and when it expires

7. Damaged IP or domain reputation

Sending to many addresses that don't exist, or getting frequent spam reports, lowers your reputation with mailbox providers. Remove bounced addresses right away (a suppression list) and only send marketing to people who opted in. You can watch your domain's status in Google Postmaster Tools.

Quick checklist

  1. From uses your company domain
  2. SPF passes (through a return path or include)
  3. DKIM is signed with your domain
  4. DMARC exists, at least p=none
  5. OTPs are queued separately from marketing
  6. There is a text/plain part and the content is short and clear
  7. Bounced addresses are removed from your lists

More articles