Firebase Trigger email and SMTP connection URI using GMAIL
Asked Answered
G

2

6

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:

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

Guadiana answered 2/1, 2021 at 9:46 Comment(1)
check my answerDextrogyrate
H
4

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://[email protected]:[email protected]:587
    

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

Hoisch answered 29/1, 2021 at 16:12 Comment(4)
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. support.google.com/accounts/answer/…Enschede
@MiroslavKuťák, added in the answer, thanks to report it!Dextrogyrate
is there still a way to use gmail account for that Email Trigger now that less secure app access is no longer supported?Scapula
Solved it: support.google.com/accounts/answer/185833 You need to add "Sign in with App Password"Scapula
B
1

I believe you need to have Google Workspace set up

Then try this: smtp://[email protected]:[email protected]:587

Bask answered 29/1, 2021 at 14:40 Comment(1)
nope, smtp-relay.gmail.com is completely another kind of smtp service.Dextrogyrate

© 2022 - 2024 — McMap. All rights reserved.