通过 Laravel 5.1 发送电子邮件时出错
Error when sending email via Laravel 5.1
当我尝试通过我的网站 运行 Laravel 5 发送电子邮件时,我收到此异常:
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/answer/14257 l140sm14142372oig.11 - gsmtp
这是我的环境配置
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=example@gmail.com
MAIL_PASSWORD=example
MAIL_ENCRYPTION=tls
代码适用于本地和其他网站,但不适用于我在新主机上的新网站。我允许从安全性较低的应用程序进行访问。可能是什么问题?
G-Mail 可能不喜欢连接到它的第 3 方应用程序。
如果您确定凭据是正确的,那么visit this link to check if you need to approve the application
当我尝试通过我的网站 运行 Laravel 5 发送电子邮件时,我收到此异常:
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/answer/14257 l140sm14142372oig.11 - gsmtp
这是我的环境配置
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=example@gmail.com
MAIL_PASSWORD=example
MAIL_ENCRYPTION=tls
代码适用于本地和其他网站,但不适用于我在新主机上的新网站。我允许从安全性较低的应用程序进行访问。可能是什么问题?
G-Mail 可能不喜欢连接到它的第 3 方应用程序。
如果您确定凭据是正确的,那么visit this link to check if you need to approve the application