简体   繁体   English

无法在 SMTP 服务器上进行身份验证 Laravel 6

[英]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 功能。

This is my.env file code:这是 my.env 文件代码:

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:这是有趣的部分:

  1. It is working fine in my local host它在我的本地主机上运行良好
  2. It is also working in my server (without http)它也在我的服务器上工作(没有 http)
  3. It stopped working when I applied https in my server.当我在我的服务器中应用 https 时它停止工作。

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:笔记:

  1. Allow less secure logged is enabled允许不太安全的日志已启用
  2. This same email is not used in three application for the SMTP email functionality.相同的 email 未在三个应用程序中用于 SMTP email 功能。

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.

相关问题 Laravel 无法使用用户名在 SMTP 服务器上进行身份验证 - Laravel Failed to authenticate on SMTP server with username Laravel,无法使用 3 个可能的身份验证器使用用户名“”在 SMTP 服务器上进行身份验证 - Laravel, Failed to authenticate on SMTP server with username "" using 3 possible authenticators 使用 Laravel Jetstream 使用用户名在 SMTP 服务器上进行身份验证失败 - Failed to authenticate on SMTP server with username using Laravel Jetstream Laravel:无法使用 2 个可能的身份验证器在 SMTP 服务器上使用用户名进行身份验证 - Laravel :Failed to authenticate on SMTP server with username using 2 possible authenticators Laravel ZOHO SMTP Email 认证失败 - Laravel ZOHO SMTP Email failed to authenticate google app smtp无法验证laravel 5.2 - google app smtp Failed to authenticate laravel 5.2 PHP SwiftMailer 无法在 SMTP 服务器上进行身份验证 - PHP SwiftMailer Failed to authenticate on SMTP server 使用 2 个可能的身份验证器在用户名“***”的 SMTP 服务器上进行身份验证失败 - Failed to authenticate on SMTP server with username “***” using 2 possible authenticators 无法使用2个可能的身份验证器在SMTP服务器上使用用户名进行身份验证 - Failed to authenticate on SMTP server with username using 2 possible authenticators Swift_TransportException无法使用用户名在SMTP服务器上进行身份验证 - Swift_TransportException Failed to authenticate on SMTP server with username
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM