[英]How to resolve 2 possible authenticators error in Laravel SMTP
I am trying to send mail.我正在尝试发送邮件。 But I am receiving an error stating that:-
但我收到一条错误消息,指出:-
Failed to authenticate on SMTP server with username \\"abcmail@gmail.com\\" using 2 possible authenticators
无法使用 2 个可能的身份验证器使用用户名 \\"abcmail@gmail.com\\" 在 SMTP 服务器上进行身份验证
I have even turned on allow less secure app in my gmail account.我什至在我的 Gmail 帐户中打开了允许安全性较低的应用程序。
Also, here is the code in my .env
file:-另外,这是我的
.env
文件中的代码:-
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=abcmail@gmail.com
MAIL_PASSWORD=12345
MAIL_ENCRYPTION=tls
What could be the possible reason?可能的原因是什么?
You need to add below settings in config/mail.php您需要在 config/mail.php 中添加以下设置
'stream' => [
'ssl' => [
'allow_self_signed' => true,
'verify_peer' => false,
'verify_peer_name' => false,
],
],
and In .eve add并在 .eve 添加
MAIL_ENCRYPTION=ssl
Use SSL for send mail threw SMTP使用 SSL 发送邮件抛出 SMTP
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.