5

I am trying to set up TRIGGER EMAIL to send emails through my GMAIL account. My problem is definitely in the SMTP connection URI because the same configuration works fine with the SENDGRID SMTP connection URI.

So I think the problem is specifically with GMAIL.

After enabling access to third-party applications in GMAIL, I have tried:

  • smtps://mymail@gmail.com:PASSWORD@smtp.gmail.com:465
  • smtps://mymail@gmail.com:PASSWORD@smtp.gmail.com
  • smtp://mymail@gmail.com:PASSWORD@smtp.gmail.com:25
  • smtp://mymail@gmail.com:PASSWORD@smtp.gmail.com

and the same variants with %40 instead of @

I always get errors like: Error: Invalid login:

Are you managed to get GMAIL to work with FIREBASE TRIGGER MAIL?

Sorry for my english

Simone Murtas
  • 59
  • 1
  • 4

2 Answers2

3

Update 10/2022 | 3rd party apps is deprecated!!!

As Miroslav Kuťák pointed out:

From May 30, 2022, ​​Google no longer supports the use of third-party apps or devices which ask you to sign in to your Google Account using only your username and password. https://support.google.com/accounts/answer/6010255


The error message is quite explicit and seem that has to do with User's Authentication.

  1. Enable Less secure apps & your Google Account for that user.

You can enabled it Here, scroll to the bottom and you will is it. IMPORTANT NOTE: Most of the time may take up to 48 hours!

If you have 2 Step verification Then DON'T enable the Less secure Apps (it won't work) and create Create and use app passwords The password can be Used for 1 App only.


  1. With the affected User, go to UnlockCaptcha, make sure that if the ONLY user logged in the session an no other Google account is, so unlockcaptcha.

  1. If still not work try:

    smtps://mymail@gmail.com:PASSWORD@smtp.gmail.com:587
    

Allow access to your Google Account: accounts.google.com/b/0/DisplayUnlockCaptcha

Federico Baù
  • 6,013
  • 5
  • 30
  • 38
  • 1
    From May 30, 2022, ​​Google no longer supports the use of third-party apps or devices which ask you to sign in to your Google Account using only your username and password. https://support.google.com/accounts/answer/6010255?authuser=4&hl=en&authuser=4&visit_id=638012484958992490-3525698788&p=less-secure-apps&rd=1 – Miroslav Kuťák Oct 13 '22 at 09:07
  • @MiroslavKuťák, added in the answer, thanks to report it! – Federico Baù Oct 16 '22 at 17:00
  • is there still a way to use gmail account for that Email Trigger now that less secure app access is no longer supported? – tmaihoff Jan 16 '23 at 23:10
  • Solved it: https://support.google.com/accounts/answer/185833 You need to add "Sign in with App Password" – tmaihoff Jan 16 '23 at 23:54
1

I believe you need to have Google Workspace set up

Then try this: smtp://mymail@mydomain.com:PASSWORD@smtp-relay.gmail.com:587