我到处搜索,试图解锁帐户中的“ LESS SECURE APPS”,试图解锁验证码。但是没有任何帮助。还有其他事情吗?
此错误:
Failed to authenticate on SMTP server with username "[email protected]" 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
。env文件
MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=MY-PASSWORD
MAIL_ENCRYPTION=tls
[email protected]
MAIL_FROM_NAME="${APP_NAME}"
控制器类代码
public function build()
{
return $this
->subject('Your account created with success!')
->replyTo('[email protected]')
->view('emails.user-registered')
->with(['user' => $this->user]);
}
我只是发布,也许有人会需要它。我已解决了在我的帐户中打开“ less secure apps”的问题。
然后我将密码放在双引号中。