Laravel Gmail not working, quot;Username and Password not accepted. Learn more...quot;(Laravel Gmail 不工作,“用户名和密码不被接受.了解更多...)
问题描述
当我尝试通过运行 Laravel 4 的网站发送电子邮件时,我收到以下异常:
When I try to send an e-mail through my website running Laravel 4, I get this exception:
{"error":{"type":"Swift_TransportException","message":"Expected response code 250 but got code "535", with message "535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 http://support.google.com/mail/bin/answer.py?answer=14257 y70sm14744455qgd.3 - gsmtp
"","file":"/var/www/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php","line":386}}
这是我的邮件配置:
return array(
'driver' => 'smtp',
'host' => 'smtp.gmail.com',
'port' => 465,
'from' => array('address' => 'mymail@gmail.com', 'name' => 'myname'),
'encryption' => 'ssl',
'username' => 'mymail@gmail.com',
'password' => 'lol',
'sendmail' => '/usr/sbin/sendmail -bs',
'pretend' => false,
);
我已经尝试了通过谷歌搜索这个问题找到的禁用链接,但它没有任何区别.
I've tried the disable link i've found by googling this issue except it didn't make a difference.
有没有办法告诉谷歌停止屏蔽这个 IP,是我"?
Is there a way to tell Google "stop blocking this IP, it's me" ?
推荐答案
我尝试了同样的事情,得到了同样的错误.所以我亲自检查了我的 gmail 帐户,我收到了来自 Gmail 本身的消息,让我知道他们阻止了对我的电子邮件帐户的访问尝试.
I tried the same thing and got the same error. So i personally checked my gmail account and i had a message from Gmail itself letting me know that they'd blocked an access attempt to my email account.
他们通过访问 https 显示了禁用此安全设置的选项://www.google.com/settings/security/lesssecureapps.
如果您访问已经登录到您的 Gmail 帐户的链接,事情实际上会更直接.
Things will actually be more straight forward if you visit that link already logged in into your Gmail account.
这篇关于Laravel Gmail 不工作,“用户名和密码不被接受.了解更多..."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Laravel Gmail 不工作,“用户名和密码不被接受.了解更多..."


基础教程推荐
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- 如何替换eregi() 2022-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01