[英]Failed to authenticate on SMTP server in Laravel 6
I am trying to use smtp email functionality in my Laravel 6 Application.我正在尝试在我的 Laravel 6 应用程序中使用 smtp email 功能。
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=******@gmail.com
MAIL_PASSWORD=******
MAIL_ENCRYPTION=tls
Here it is the funny part:这是有趣的部分:
It gives me below error:它给了我以下错误:
Failed to authenticate on SMTP server with username "*********@gmail.com" using 3 possible authenticators.
无法使用 3 个可能的身份验证器在用户名为“*********@gmail.com”的 SMTP 服务器上进行身份验证。 Authenticator LOGIN returned Expected response code 235 but got code "534", with message "534-5.7.14 534-5.7.14 Please log in via your web browser and then try again. 534-5.7.14 Learn more at 534 5.7.14 https://support.google.com/mail/answer/78754 g6sm37628450pja.2 - gsmtp ".
身份验证器登录返回预期响应代码 235 但收到代码“534”,消息“534-5.7.14 534-5.7.14 请通过您的 web 浏览器登录,然后重试。534-5.7.14 在 534 5.7 了解更多信息。 14 https://support.google.com/mail/answer/78754 g6sm37628450pja.2 - gsmtp”。 Authenticator PLAIN returned Expected response code 235 but got code "534", with message "534-5.7.14 534-5.7.14 Please log in via your web browser and then try again. 534-5.7.14 Learn more at 534 5.7.14 https://support.google.com/mail/answer/78754 g6sm37628450pja.2 - gsmtp ".
Authenticator PLAIN 返回预期响应代码 235 但收到代码“534”,消息为“534-5.7.14 534-5.7.14 请通过您的 web 浏览器登录,然后重试。534-5.7.14 在 534 5.7 了解更多信息。 14 https://support.google.com/mail/answer/78754 g6sm37628450pja.2 - gsmtp”。 Authenticator XOAUTH2 returned 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 https://support.google.com/mail/?p=BadCredentials g6sm37628450pja.2 - gsmtp ".
身份验证器 XOAUTH2 返回预期响应代码 250 但得到代码“535”,消息“535-5.7.8 用户名和密码未被接受。了解更多信息,请访问 535 5.7.8 https://support.google.com/mail/?p= BadCredentials g6sm37628450pja.2 - gsmtp“。
Note:笔记:
the email is working in localhost, the less secure account account verification is correct email在本地工作,安全性较低的帐户帐户验证正确
But you can't use your email in more than 3 projects, so you should stop using this email on other accounts.但是你不能在超过3个项目中使用你的email,所以你应该停止在其他账户上使用这个email。
Check if your gmail password has the $ character, if so change it.检查您的 gmail 密码是否有 $ 字符,如果有则更改它。 it worked for me
它对我有用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.