如何使用Outlook发送Laravel邮件?

n9vozmp4  于 2023-01-27  发布在  其他
关注(0)|答案(1)|浏览(237)

我想在用户注册时发送邮件,但出现此错误。

Failed to authenticate on SMTP server with username "*****" using 2 possible authenticators. Authenticator LOGIN returned Expected response code 235 but got code "535", with message "535 5.7.3 Authentication unsuccessful ". Authenticator NTLM returned Expected response code 235 but got code "535", with message "535 5.7.3 Authentication unsuccessful ".

我该怎么解决这个问题?
下面是我的邮件配置:

MAIL_DRIVER=smtp
MAIL_HOST=*****
MAIL_PORT=25
MAIL_USERNAME=****
MAIL_PASSWORD=****
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=covid19@sante.gouv.dj
laik7k3q

laik7k3q1#

如果这是针对Office 365(因为您将问题标记为“outlook”,尽管它与Outlook无关),则需要在端口587上使用TLS连接到smtp.office365.com。身份验证为OAuth2。

相关问题