我到处搜索,试图解锁帐户中的“ LESS SECURE APPS”,并试图解锁验证码。但是没有任何帮助。还有其他事情要做吗?
此错误:
Failed to authenticate on SMTP server with username "my@gmail.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
.env文件
MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=MY-GMAIL@gmail.com
MAIL_PASSWORD=MY-PASSWORD
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=THE-SENDER-EMAIL@outlook.pt
MAIL_FROM_NAME="${APP_NAME}"
控制器类代码
public function build()
{
return $this
->subject('Your account created with success!')
->replyTo('MY-REPLY-MAIL@outlook.pt')
->view('emails.user-registered')
->with(['user' => $this->user]);
}