[英]Why does SMTP via gmail work locally but not on my production server?
I'm running a nodejs server hosted on AWS (Ireland) and using emailjs to send emails. 我正在运行AWS(爱尔兰)托管的nodejs服务器并使用emailjs发送电子邮件。 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. 我正在使用的电子邮件帐户是一个Gmail帐户,我可以从我的本地计算机发送电子邮件,没有任何问题,但电子邮件无法从生产服务器发送。
Outbound firewall is set to allow all traffic on all ports. 出站防火墙设置为允许所有端口上的所有流量。
The error message I get is "authorization.failed". 我得到的错误消息是“authorization.failed”。
Gmail blocks IP addresses from AWS by default. Gmail默认情况下会阻止来自AWS的IP地址。
After logging into gmail locally, visit the following URL. 在本地登录gmail后,请访问以下URL。
https://accounts.google.com/DisplayUnlockCaptcha 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. 确认您希望AWS服务器能够访问您的Gmail帐户后,您的服务器将被列入白名单。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.