Why your app emails go to spam
App emails land in spam mostly because they come from a domain that cannot prove it sent them. Verify a sending domain, add three DNS records, and fix the content.

Key takeaways
- The top cause is sending from a shared or unverified address. Connect your own sending domain, ideally a subdomain like mail.yourdomain.com.
- SPF, DKIM and DMARC are three DNS records that prove an email really came from you. Gmail and Yahoo require them for bulk senders.
- Content matters less than people think, but link shorteners, image-only emails and a missing plain-text version still hurt.
If the emails your app sends (confirmations, password resets, receipts) are going to spam, the most likely cause is that they are sent from a domain that cannot prove it sent them. Inbox providers like Gmail and Outlook check DNS records called SPF, DKIM and DMARC on every message. Without them, or when sending from a shared default address, your mail looks like it could be forged, and spam filters treat it that way. Fixing authentication solves most cases; content and reputation do the rest.
Check what the inbox thinks first
Send a message from your app to a Gmail address you own, find it (in spam, probably), open the menu and choose Show original. Gmail prints three lines near the top: SPF, DKIM and DMARC, each with PASS or FAIL. Outlook and other clients show the same data in the message headers as `Authentication-Results`. This takes two minutes and tells you which of the causes below you have. If all three pass and the mail still lands in spam, skip ahead to reputation and content (causes 4 to 7). If DKIM or DMARC fail, the fix is in DNS, and no amount of rewording the email will help.
The causes, most likely first
1. Sending from a default or shared sender
Most backends include a built-in sender so email works on day one. In Startbase Cloud, platform email lets your app send with no keys or DNS setup, with a daily limit per project. Shared senders are great for testing and for the first handful of users. They are not built for volume, and your mail shares a reputation with everything else sent through them.
How to check: the "from" address is not on your own domain. The fix: connect your own sending domain. In Startbase, the Emails section of the Backend tab walks you through it: add a Resend API key (it is saved as your `RESEND_API_KEY` secret), enter your domain, and copy the DNS records it shows into your domain registrar. Verification checks every few seconds and flips to verified once DNS propagates. Then click "Use this domain for auth emails" so confirmations and magic links come from your brand too. Until the domain verifies, Resend only delivers to your own address, which is a common reason "emails never arrive" during setup.
2. Missing or broken SPF, DKIM or DMARC
Each record does one job:
- SPF (a TXT record) lists the servers allowed to send mail for your domain. A domain can have only one SPF record; two separate ones make both fail. Merge them into one line with several `include:` entries.
- DKIM (usually a TXT or CNAME record) publishes a public key. Your email provider signs every message with the matching private key, so the inbox can verify nobody altered it and it came from you.
- DMARC (a TXT record at `_dmarc.yourdomain.com`) tells inboxes what to do when SPF or DKIM fail, and where to send reports. Start with `v=DMARC1; p=none; rua=mailto:you@yourdomain.com` to collect reports, then tighten to `quarantine` once everything passes.
Since 2024, Google and Yahoo require SPF, DKIM and DMARC from anyone sending in bulk to their users, and they expect messages to pass. Even a small app benefits from meeting the same bar. How to check: the Show original view. The fix: add exactly the records your email provider gives you. A typo in a long DKIM value is common, so paste with the copy button rather than retyping.
3. Sending from your main domain
The Startbase docs recommend a subdomain such as `mail.yourdomain.com` for sending. It keeps app mail separate from your personal or team mail, so a burst of bounces from a sign-up form spam attack does not damage the reputation of the domain you use for everyday email. It also avoids clashing with an existing SPF record for your workplace mail.
4. New domain, sudden volume
A brand-new domain that sends 5,000 emails on launch day looks exactly like a spammer. Inboxes trust senders gradually. The fix: warm up. Send transactional mail (the emails users asked for) first; it gets opened, which builds reputation. If you plan a newsletter or a big announcement, start with your most engaged users and increase over a few weeks.
5. Fake sign-ups and bounces
Bots that fill sign-up forms with random addresses make your app send confirmations to mailboxes that do not exist. High bounce rates are a strong spam signal. How to check: many Pending users with odd addresses in the Users tab, or a bounce count in your email provider's dashboard. The fix: add a bot check to sign-up, rate-limit the form, and stop sending to addresses that bounced.
6. Content that looks like spam
Content filters matter less than authentication, but some patterns still hurt: an email that is one big image with no text, link shorteners (they hide the destination), links to a different domain than the sender, ALL CAPS subject lines, and HTML with no plain-text version. The fix: plain, short emails with a clear subject ("Confirm your email for Plotline"), your app name in the from name, links to your own domain, and a plain-text part.
7. Marketing mail without an unsubscribe
For digests, newsletters and promotions, inboxes expect a visible unsubscribe link and, for bulk senders, one-click unsubscribe headers. When people cannot unsubscribe, they mark you as spam, which hurts every email you send, including password resets. Keep marketing mail and transactional mail clearly apart.
A note on auth email templates
Startbase lets you brand five auth templates: Confirm sign-up, Magic link, Reset password, Invite user and Change email address. Edit freely, but keep placeholders like `{{ .ConfirmationURL }}` intact; removing them breaks the link inside the email. Short templates with one clear button and your app name in the subject do best.
The message to send the agent
The DNS records you add yourself at your registrar. Everything in the app, the agent can handle:
Our sign-up confirmation and receipt emails land in Gmail spam. Show original says SPF: PASS, DKIM: FAIL, DMARC: FAIL, and the from address is the default sender. I have connected mail.example.com in the Emails section and it shows verified. Please switch auth emails and all app emails to send from hello@mail.example.com with the from name "Plotline", add a plain-text version to every app email, remove the link shortener from the receipt template, add an unsubscribe link to the weekly digest only, and make sure sign-up has a bot check and a rate limit. Then tell me the exact DMARC record I should add to start with.
For the bigger picture of what your app can send and how, read sending emails from your app, and the glossary entry on DNS if records are new to you. Setup steps are in the Emails docs.
Frequently asked questions
Why do my emails go to spam in Gmail but not Outlook?
Each provider weighs signals differently. Gmail is strict about DKIM and DMARC alignment and about user engagement. Use Show original in Gmail to see which check fails.
How long does it take for SPF and DKIM to work?
Most DNS changes are picked up within minutes, but some take up to 48 hours. Reputation takes longer: expect a few weeks of normal sending before a new domain is fully trusted.
Do I need DMARC for a small app?
It is strongly recommended. Major inboxes require it for bulk senders, and a basic p=none record costs nothing and gives you reports on who sends mail as your domain.
Can I send from my Gmail address through my app?
Not reliably. Gmail's DMARC policy tells other servers to reject mail claiming to be from gmail.com that Google did not send. Use your own domain.

