简体   繁体   English

为什么SMTP通过Gmail本地工作但不在我的生产服务器上?

[英]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.

相关问题 为什么机密管理工具 SecretHub 可以在本地运行,但不能在 heroku 产品中运行? - why does secret management tool SecretHub work locally but not in heroku production? 为什么我的Nodejs服务器不能在Windows上运行? - Why does my Nodejs server not work on Windows? 为什么Firebase在我的nodejs服务器上不起作用? - Why does firebase not work on my nodejs server? 为什么nodeJS API可以在本地工作但无法生产? - Why might a nodeJS API work locally but fail in production? Nodemailer SMTP无法在生产服务器上运行 - Nodemailer SMTP not working on production server 为什么 Google 身份验证在本地有效,但在 Heroku 上无效? - Why does Google authentication work locally but not on Heroku? 为什么将我本地创建的MEAN-Application推送到OpenShift不起作用? - Why does pushing my locally created MEAN-Application to OpenShift not work? 为什么我的上传代码在本地工作,但在上传到 heroku 后不起作用? - Why is my code to upload working locally but does not work after being uploaded to heroku? 为什么 Nodemailer 在本地工作而不是在生产环境中工作? - Why Nodemailer is working locally but not in Production? 为什么我需要用户名和密码才能将电子邮件发送到gmail smtp服务器 - Why do I need a username & password to send an email to gmail smtp server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM