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 中的请求之间持久化对象 2022-01-01
- 通过 PHP SoapClient 请求发送原始 XML 2021-01-01
- 在 Woocommerce 中根据运输方式和付款方式添加费用 2021-01-01
- 在 PHP 中强制下载文件 - 在 Joomla 框架内 2022-01-01
- Libpuzzle 索引数百万张图片? 2022-01-01
- XAMPP 服务器不加载 CSS 文件 2022-01-01
- 在多维数组中查找最大值 2021-01-01
- 超薄框架REST服务两次获得输出 2022-01-01
- mysqli_insert_id 是否有可能在高流量应用程序中返回 2021-01-01
- WooCommerce 中选定产品类别的自定义产品价格后缀 2021-01-01