Why is SMTP via gmail working locally but not on my production server?

I am running a nodejs server hosted on AWS (Ireland) and using emailjs to send emails. The email account I am using is a gmail account and I can send emails from my local computer without any problem, but emails are not sent from the production server.

The outbound firewall is allowed all traffic on all ports.

The error message I receive is "authorization.failed".

+3


source to share


1 answer


Gmail blocks IP addresses from AWS by default.

After logging into gmail locally visit the following url.



https://accounts.google.com/DisplayUnlockCaptcha

Once you confirm that you want your AWS server to be able to access your gmail account, your server will be whitelisted.

+5


source







All Articles