Why does SMTP via gmail work locally but not on my production server?

青春壹個敷衍的年華 提交于 2019-12-05 02:49:18

问题


I'm running a nodejs server hosted on AWS (Ireland) and using emailjs to send emails. The email account I'm using is a gmail account and I can send emails from my local machine without any issues, but the emails fail to send from the production server.

Outbound firewall is set to allow all traffic on all ports.

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


回答1:


Gmail blocks IP addresses from AWS by default.

After logging into gmail locally, visit the following URL.

https://accounts.google.com/DisplayUnlockCaptcha

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



来源:https://stackoverflow.com/questions/27140402/why-does-smtp-via-gmail-work-locally-but-not-on-my-production-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!