Why your app’s emails land in spam, and the three DNS records that fix it
Password resets and booking confirmations are worthless if they land in spam. Three DNS records decide whether mail from your domain is trusted, and most apps get at least one wrong.
When your app sends an email, the receiving server asks two things: is this really from the domain it claims, and did that domain’s owner allow it? Three records in your DNS answer. If one is missing or wrong, Gmail and Outlook start treating your mail as suspect, and your customers never see the reset link.
SPF says who may send
SPF is one TXT record on your domain listing the servers allowed to send for it.
yourdomain.com. TXT "v=spf1 include:amazonses.com -all"A domain may have only one SPF record. When you add a second provider, merge it into the same record rather than adding another, because two separate records make SPF fail for everyone. SPF also stops after ten DNS lookups, and every include: spends one or more, so remove providers you no longer use. -all says reject anything not listed; ~all says treat it as suspicious. If you are not sure you know every sender, start with ~all.
DKIM signs the message
Your provider signs each message with a private key and publishes the matching public key in DNS, under a name like resend._domainkey.yourdomain.com. Receivers fetch it and check the signature. You paste the record exactly as the provider gives it. The usual trap is a DNS host that appends your domain to whatever you type, producing resend._domainkey.yourdomain.com.yourdomain.com. Check what the DNS actually returns, not what you typed.
DMARC decides what happens on failure
_dmarc.yourdomain.com. TXT "v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com"p=none means watch and report without blocking. Leave it that way for a few weeks, read the reports to find any sender you forgot, then tighten to p=quarantine and eventually p=reject. DMARC also checks alignment: the domain in the visible From address has to match the domain that passed SPF or DKIM. A provider that signs with its own domain can pass DKIM and still fail DMARC for your From address, which is why you set up custom-domain signing.
Check it from a terminal
dig TXT yourdomain.com +short
dig TXT _dmarc.yourdomain.com +short
dig TXT resend._domainkey.yourdomain.com +shortOn Windows, nslookup -type=TXT yourdomain.com does the same. You want exactly one record starting v=spf1 and exactly one starting v=DMARC1. Then send a real message from the app to a Gmail address, open it, choose Show original, and look for spf=pass, dkim=pass and dmarc=pass. Whichever says otherwise is the record to fix.
The mistakes we would check first
Two DMARC or two SPF records. Receivers do not guess which you meant; they ignore both.
A provider still in sandbox. Some, such as Amazon SES on a new account, deliver only to addresses you have verified until you request production access, so mail to real customers goes nowhere and nothing tells you.
Sending from a free address like a Gmail account through your provider. You cannot authenticate a domain you do not own.
One domain for everything. Send receipts and resets from a subdomain such as mail.yourdomain.com so a marketing complaint cannot drag them down with it.
Where the rules differ between India and the US
The technical records are the same everywhere. The law around them is not. In the US, the CAN-SPAM Act requires marketing email to carry a working unsubscribe, your postal address and an honest subject line, and it expects opt-outs to be honoured promptly. In India there is no direct equivalent for email, but the Digital Personal Data Protection Act expects you to have a lawful basis, usually consent, for using someone’s address, and business texts are regulated separately: commercial SMS has to go through registered sender IDs and templates under TRAI’s rules.
Whatever the country, Google and Yahoo have required since 2024 that anyone sending in volume (over 5,000 messages a day to their users) has SPF, DKIM and DMARC in place, offers one-click unsubscribe on marketing mail, and keeps spam complaints low. A small app is judged on the same signals even when it is under that line.
Build the app first, then fix the mail
Describe the app and check the estimate. When it needs to send email, you bring your own provider account.
Start freeFound something wrong or out of date? Write to hello@wyberai.com and we will fix it and say so here. Rules, fees and rates mentioned in our posts change, and this one was last checked on 18 November 2026.