【问题标题】:Laravel SMTP Gmail failedLaravel SMTP Gmail 失败
【发布时间】:2020-09-24 16:25:28
【问题描述】:
Failed to authenticate on SMTP server with username "user@email.com" using 3 possible authenticators. Authenticator LOGIN returned Expected response code 235 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 70sm7122401qkk.10 - gsmtp
 ". Authenticator PLAIN returned Expected response code 235 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 70sm7122401qkk.10 - 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 70sm7122401qkk.10 - gsmtp
 ".

早上好,我正在尝试连接 Gmail Smtp,上面是我在 laravel 5.8 中遇到的错误,我在个人邮件上生成了应用程序密码,然后发送电子邮件有效,但是当我在上生成应用程序密码时工作邮件,我立即收到错误消息。也就是说,当我使用我的个人邮件和应用程序密码时,一切正常,但我一使用工作邮件,我立即收到错误。

在两个邮箱上,我都做了以下操作,这些操作在 Google 支持中有所描述 https://support.google.com/accounts/answer/185833 https://support.google.com/mail/?p=BadCredentials

MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=user@email.com
MAIL_PASSWORD=generatedAppPassword
MAIL_ENCRYPTION=tls

如果你能帮我做这件事,我将不胜感激

【问题讨论】:

    标签: laravel smtp gmail email


    【解决方案1】:

    确保您的帐户启用了“访问不太安全的应用程序”并且未启用 2fa 登录。

    【讨论】:

      【解决方案2】:

      我遇到了同样的问题,我在

      下解决了这个问题

      转到 gmail.com

      我的帐户

      并启用

      允许安全性较低的应用:开启

      开始工作

      【讨论】:

        猜你喜欢
        • 2019-01-20
        • 2017-10-26
        • 2014-07-21
        • 1970-01-01
        • 2020-12-29
        • 2021-04-01
        • 2020-05-15
        • 2019-03-14
        • 2015-03-20
        相关资源
        最近更新 更多