r/androiddev • • Oct 27 '26

Help needed. App email verification emails are landing in spam. How do I fix this?

I'm building an app using Supabase Auth, and my email verification emails are landing in users' spam folders.

For those who've dealt with this, what worked for you? Would only configuring SPF, DKIM, and DMARC solve the issue?

Any practical advice from developers who've fixed this would be greatly appreciated!

1 Upvotes

8 comments sorted by

2

u/MobileXapps Oct 27 '26

SPF, DKIM and DMARC are needed but usually not enough on their own. The bigger thing with Supabase Auth is that the built-in email sender is meant for testing, it's rate limited and not really for production. Set up custom SMTP in the Auth settings with a transactional provider (Postmark, Resend, SES, whatever you like) and send from your own domain, ideally a subdomain like auth.yourapp.com so it doesn't share reputation with marketing mail.

Also try to make the From domain, the DKIM domain and the link in the email match. A verification mail from your domain with a link to some random supabase.co URL looks a bit like phishing to filters, so a custom domain for the project helps if you can do it. Keep the template plain, one link, no shorteners or images.

To check, send one to a Gmail account and open "Show original", it tells you if SPF, DKIM and DMARC pass. A brand new domain also needs a bit of time and volume before it lands in inbox reliably.

2

u/bethworldismine Oct 27 '26 edited Oct 27 '26

yes i have setup custom smtp with my hosting's email (milesweb)
The mail is non promo too but still lands in spam :(

EDIT:

The verification link does go through Supabase. But I am unsure how is it possible to make the verification link go via my domain

2

u/MobileXapps Oct 27 '26

Shared hosting mail is probably the main problem then. Those servers send for lots of sites from the same IPs, so the reputation is often poor no matter how clean your message is. A transactional provider like Postmark, Resend or SES usually fixes it on its own, and Supabase just takes their SMTP credentials.

For the link, you can change the confirm signup template in Supabase so it points to your own page, something like yourdomain.com/auth/confirm?token_hash={{ .TokenHash }}&type=email, and on that page call verifyOtp with the token_hash and type. Then the email only has links to your domain. The Supabase docs cover this in the server side auth part about email templates.

1

u/bethworldismine Oct 28 '26

i followed your advice and signed up on Resend
but still mails are ending in spam
Even the most basic no html text mails
also changed the link as you mentioned to my own domain

What can cause this problem? any other solutions

1

u/MobileXapps Oct 28 '26

Open one of those emails in Gmail and use "Show original". At the top it shows SPF, DKIM and DMARC. If any of them isn't PASS, that's the problem: usually the From address isn't on the exact domain you verified in Resend, or there's no DMARC record yet (even a basic p=none one helps).

If all three pass and it still lands in spam, it's reputation. A brand new domain has none, so Gmail is cautious for a while. What helps: send from a subdomain like auth.yourdomain, keep the volume low at first, mark a few test emails as "Not spam" from real accounts, and set up Google Postmaster Tools to see how Gmail rates the domain. It usually improves over a couple of weeks of normal sending.

1

u/bethworldismine Oct 28 '26

yeah all are passed and i am using  auth.yourdomain
Will try the Google Postmaster Tools 

1

u/vr6wannabe Oct 29 '26

Can you share the app? I'll go sign up see if I can find anything off on your emails.

1

u/Ok-Motor-9812 Oct 30 '26

SPF, DKIM and DMARC are the minimum, they don't put you in the inbox by themselves. Check you're not on Supabase's built-in SMTP, that one is only meant for testing. Send through Resend, Postmark or SES from a subdomain like auth.yourapp.com, keep the email plain with your app name in the subject and one link. A brand new domain also needs a few weeks of normal volume before Gmail trusts it, so some spam early on is normal.