Reputation: 105
using Gmail SMTP
to send mail
from my web-application
which is Deployed in heroku
But getting Authentication error
.
I'm receiving a mail
from Google
saying that:
Someone just used your password to try to sign in to your Google Account **********@gmail.com, using an application such as an email client or mobile device. Details: Thursday, April 20, 2017 5:35 AM (ET) Ashburn, VA, USA* Google stopped this sign-in attempt, but you should review your recently used devices:
I tried all these below:
1)I have reviewed the recent login and said that was me
but still google is not allowing me to login.
2)Turning ON access for less secure apps.
Sending mail
Code is working fine in my local system, But After deploy
it is not working.
can anyone tell me that how I can make my web-application
which is deployed in Heroku server
which is running from location -Ashburn,VA, USA*
to be approved to get login into my gmail.
Thank you in advance :-)
Upvotes: 3
Views: 563
Reputation:
I had the same problem as you - I am also using a gmail account to send SMTP mail via a heroku account. Try logging in to your gmail account and then logging out, and then back in. You can also try this further authentication mechanism at : https://accounts.google.com/displayunlockcaptcha.
In my case, it took a little while (some anxious wait time?) after doing this before I was able to send SMTP mail. You might also want to consider if you haven't already using one dedicated gmail account for SMTP mail.
Upvotes: 1