使用 Gmail SMTP
从部署在 heroku
中的 web-application
发送 mail
但是得到 身份验证错误
。
我收到一封来自 Google
的邮件
,内容如下:
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:
我尝试了以下所有这些:
1) 我查看了最近的登录并说 那是我
但谷歌仍然不允许我登录。
2) 为安全性较低的应用开启访问权限。
发送邮件
代码在我的本地系统中运行良好,但在部署
之后它无法运行。
谁能告诉我如何制作部署在 Heroku 服务器
中的 web 应用程序
,该服务器从位置 -Ashburn,VA, USA *
获准登录我的 gmail。
提前谢谢你:-)
最佳答案
我遇到了和你一样的问题 - 我也在使用 gmail 帐户通过 heroku 帐户发送 SMTP 邮件。尝试登录到您的 gmail 帐户,然后注销,然后重新登录。您也可以在以下网址尝试进一步的身份验证机制:https://accounts.google.com/displayunlockcaptcha .
在我的例子中,在我能够发送 SMTP 邮件之前花了一些时间(一些焦急的等待时间?)。 如果您还没有为 SMTP 邮件使用一个专用的 gmail 帐户,您可能还需要考虑一下。
关于email - 使用 `Gmail SMTP` 从我的 Web 应用程序发送 `mail`。但是收到身份验证错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43976782/