Why your app's emails go to spam — and how to fix it

The symptom is familiar: your app sends a confirmation email, your provider's dashboard proudly shows delivered, and the user writes "nothing arrived." So you start editing the text: drop the word "free," change the subject, strip the emoji. It doesn't help.
It doesn't help because the recipient's mail server usually decides the email's fate before it looks at the text. Its first question is a different one: "does this sender even have the right to write on behalf of this domain?" With nothing to prove it, the email goes to spam — however impeccably polite the contents.
Below are three causes that cover almost every case. Start with the first; it shows up more often than all the others combined.
First, see what the mail server itself says
Before changing anything, get facts. Send an email to your own Gmail, open it, click "Show original" (on mobile: "Show details" → the source). Right at the top you'll find a block like this:
Authentication-Results: mx.google.com;
spf=pass ...
dkim=pass ...
dmarc=pass ...
Three lines, three checks. All pass — your problem is elsewhere (reputation, content). Any fail or none — that's your cause, and it's below.
Cause 1: your domain doesn't sign your mail
How to check. In that same block: spf=none / dkim=none. It means your domain's DNS has no records that let someone else's mail server confirm this email was sent with the owner's permission.
What those three words mean:
- SPF — a list of servers allowed to send on behalf of your domain. Published as a TXT record in DNS.
- DKIM — a cryptographic signature on the message. The public key lives in DNS, the private one at your sending service. If the signature checks out, the email wasn't altered en route.
- DMARC — the policy: what to do when checks fail, and where to send reports.
How to fix. Every transactional service (Resend, Postmark, SendGrid, Amazon SES) hands you ready-made records in its domain section — copy them into DNS at your registrar. It's the same operation as connecting a domain to a site, just different records.
Two details people trip on: DNS changes don't propagate instantly (minutes to an hour), and a domain must have exactly one SPF record — if you use several services, their servers get listed inside that single record, not in two separate ones.
Cause 2: the "From" address isn't on your domain
How to check. spf=pass, dkim=pass, but dmarc=fail. The classic: one domain is signed while the From field shows another — say [email protected], because "it's clearer for the user that way."
Why it fails: the signatures have to belong to the domain the human sees in the email. That's called alignment. A signature from sendgrid.net on a message with From: [email protected] is, as far as DMARC is concerned, one person's signature on another person's passport. Worse, gmail.com publishes a strict DMARC policy, and mail servers honestly enforce it: mail from gmail.com not sent through Gmail gets bounced.
How to fix. Put an address on your own signed domain in From: [email protected]. Want replies to reach your personal inbox? That's what the separate Reply-To header is for, and nobody validates it.
Cause 3: you're sending mail from your own server
How to check. Your code sends over SMTP straight from your VPS instead of through a sending service. This often looks like "the emails don't go anywhere at all" or "they go, but into spam, always, for everyone."
There are two barriers here at once. First, IP reputation. Your fresh address is a stranger to mail systems, and cloud hosting ranges are viewed with suspicion up front, because that's historically where spam floods from. Second, port 25 is blocked by most hosts by default — deliberately, for exactly the same reason.
How to fix. Don't fight for reputation — use a transactional service. They already have warmed-up IPs and working relationships with the providers, and their free tiers are more than enough for a first project. How to wire sending up from code — there's a separate guide.
What else gets looked at
Checks pass and mail still lands in spam? Then the remaining criteria kick in, and since 2024 the big providers have stated them outright:
- Complaints. Your "this is spam" rate must stay under 0.3%. One annoyed person in three hundred is already a lot.
- One-click unsubscribe. Bulk mail needs the
List-Unsubscribeheader so the unsubscribe button lives in the mail client's UI, not in six-point type in the footer. - Volume. The requirements turn hard at 5,000 messages a day to Gmail — but SPF and DKIM apply to everyone.
- Enforcement got stricter. Non-compliant mail used to be deferred with a temporary error; now it's rejected outright — on your side that shows up as a send failure, visible in your logs.
And a practical one: don't mix transactional mail (passwords, receipts) with marketing campaigns on one domain. A single bad campaign ruins the domain's reputation — and password-reset emails stop arriving along with it. The usual practice is a separate subdomain for campaigns.
How do I confirm my email is authenticated?
Send it to your own Gmail and open "Show original": you want spf=pass, dkim=pass, dmarc=pass. Thirty seconds, and the most reliable test there is — it shows exactly what the receiving side sees.
Does a small project need DMARC?
Yes, a minimal one. Even a record with p=none (bounce nothing, just send reports) already makes your domain look "configured" to mail providers and switches on the reports that reveal who's sending mail in your name.
The AI Architect 2027 course: step by step from computer basics to your own app and first customers. 543 short lessons on your phone.





