3

Instead of using the built-in email system in Firebase, I wanted to use a SMTP called SMTP2Go but was wondering how to connect it and if need to buy my own email domain first or not? What requirements are needed to connect a SMTP to Firebase?

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Dilan Omer
  • 63
  • 1
  • 2
  • 7
  • Unfortunately questions asking us to recommend a tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, please describe the problem and what you have done so far to solve it. – rst-2cv Jun 24 '18 at 08:49
  • @ResetACK their question(s) seemed to be 1) how to connect it, and 2) does he need to buy a domain name first or not to make it work 3) what requirements were needed to connect the external smtp server to firebase.... doesn't seem to ask any opinions on services. – courtsimas Oct 26 '18 at 19:37

2 Answers2

10

I assume you're trying to set up a custom SMTP server for sending (verification, password reset, email change) emails from Firebase Authentication. You can set a custom SMTP server in the Firebase Authentication console.

Setting a custom SMTP server for Firebase Authentication

You don't need a custom domain for this. All you need to know is the SMTP host and port of SMTP2GO (something like mail.smtp2go.com and 587), and your account details from them (the username/password you use to log into smtp2go with).

The Sender address field is just what recipients see in the "From" field of the email, and also where any replies they send will be going. It can be whatever address you want to use to support your users.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • Is it possible to use the default Firebase email (example@myapp.firebaseapp.com)? – Dilan Omer Jun 24 '18 at 22:05
  • I actually have no idea where that address goes to. The projects I just checked have `noreply@.firebaseapp.com`, which makes it seem like those will go to a non-existing mailbox. If I were you I'd start by testing with a personal mail address, e.g. `youremail@gmail.com`. Once that works, you can see what other `Sender address` works. – Frank van Puffelen Jun 24 '18 at 23:28
  • Will do. Thank you – Dilan Omer Jun 25 '18 at 06:28
  • 1
    Since google removed the option to allow less secure apps to log in to a Gmail account in May 2022, you are **not able** to use a Gmail account for the `SMTP`relay. – Joe Moore Jan 18 '23 at 10:50
4

If you would like to use the Gmail account as SMTP service for Firebase following steps might help you with that. I have shared a medium post about it if you would like to have more details.

  1. Enable the 2 step verification for the G Suite account.
  2. Create an app password for the account.
  3. Allow users to manage their access to less secure apps
  4. Unlock the captcha

The G-Suite account is ready to be used as an SMTP service for firebase.

Check this link please for more details.

Ömer Taban
  • 130
  • 1
  • 5