Josh Karol
Josh Karol

Reputation: 563

Firebase email verification goes to spam folder

I made a mobile app and used Firebase for backend and authentication. When I use firebase's built in email verification, the email always goes to the junk folder / spam.

Does anyone know how to fix this?

Upvotes: 54

Views: 15369

Answers (5)

elliotmus
elliotmus

Reputation: 51

In addition to customizing your domain, as others have suggested, I would also take the measure of using your own SMTP server if possible.

Firebase Console > Authentication > Templates > SMTP Settings > Enable

From here, you can populate the settings with information from your SMTP (e.g. Google Workspace, if that's what you use). The sent emails will virtually adopt the same spam status as that of your SMTP (so ensure you've followed all the best practices for having your emails recognized as not being spammy). If you are using this server for other high-priority emails, this becomes even more important, and you may even consider isolating it into its own SMTP server if that is the case.

This is one of my first answers on StackOverflow, so let me know if there is any way I can improve.

Upvotes: 0

ekpono
ekpono

Reputation: 252

I had the same exact problem, The problem is that your sender name is [email protected] and that made all my emails going to spam.

What I did was to visit my console https://console.firebase.google.com/project/project_name/authentication/emails

which is the template tab of the Authentication page.

Click on the pencil icon and click on the Customize Domain enter image description here

Add and verify your domain.

That will solve the problem

Upvotes: 0

Rômulo Valentim
Rômulo Valentim

Reputation: 31

I fixed this issue by only changing the project name.

Go to your firebase project > Project Settings > Main page.

There you'll see some public settings, change the name of your project, the default will show something like "project-(yourProjectId)", put for example "Project Name".

Upvotes: 0

Olivier Lépine
Olivier Lépine

Reputation: 668

Have a look at the headers of the received email message. Typically, Antispam tools use headers to add the detail of the scoring elements that lead to the message being flagged as spam. This will give you insights on why this happens since reasons can be multiple and cumulative (Title, content, DNS, DKIM, etc.)

Upvotes: 1

ajorquera
ajorquera

Reputation: 1309

That's weird. Firebase made restrictions to avoid this problem. Check here

Spam filters normally look for these things:

  • Subject Line: looking for common words and phrases associated with spam.
  • Content: looking for suspicious links, low text to image ratios, and other spammy hallmarks.
  • Metadata: looking at the To/From/CC fields, the sender’s domain, and embedded code.
  • IP address: looking for IPs that have been flagged frequently as spam by both filters and recipients in the past.

More Info


Ill suggest using your own domain to send emails. You can check this article on how to do this. You will also get the extra benefit of looking more professional.

Hope it helps :)

Upvotes: 9

Related Questions