server send emails using gmail smtp gets alerts(服务器使用 gmail smtp 发送电子邮件获取警报)
问题描述
我做了类似 这个的事情我的网络应用程序通过 gmail 的 SMTP 发送邮件.我在本地尝试过,它奏效了.上传到服务器(位于另一个国家/地区)后,我收到此错误:
I did something like this to make my web app sends mails through gmail's SMTP. I tried locally and it worked. after I upload to the server (which is in another country) I get this error:
authentication failure [SMTP: Invalid response code received from server (code: 534, response: 5.7.9 Please log in with your web browser and then try again. Learn more at 5.7.9 https://support.google.com/mail/bin/answer.py?answer=78754 5.7.9 {WEBLOGINREQUIRED} fl2sm1579003pab.23 - gsmtp)]
有没有办法忽略这个?
推荐答案
对于仍然感兴趣的人的答案:
For anyone still interest the answer:
Google 必须允许您的应用使用您自己的帐户,要允许这个 google 提供了一个简单的方法,只需转到 https://accounts.google.com/DisplayUnlockCaptcha,然后点击 continue,然后在 10 分钟后,使用您的应用程序再次尝试发送电子邮件,Google 会记住该应用程序/服务并允许您的应用程序只要您不更改密码,就可以访问您的帐户.
Google have to allow your app to use your own account, to allow this google provided an easy way, just go to https://accounts.google.com/DisplayUnlockCaptcha, then click continue, then with 10 min, use your application to try to send email again, and google will remember the application/service and allow your application to access your account as long as you don't change your password.
干杯
这篇关于服务器使用 gmail smtp 发送电子邮件获取警报的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:服务器使用 gmail smtp 发送电子邮件获取警报
基础教程推荐
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 如何替换eregi() 2022-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
