问题描述
在我的Laravel-5.8项目中,我试图使用office365发送电子邮件/通知
console.log(listName); //Today
console.log(listName == 'Today'); //false---------it should be true
console.log('Today' == 'Today'); //true
但是我得到了这个错误:
#message:“”“ 无法使用2个可能的验证器在用户名“ [email protected]”的SMTP服务器上进行验证。身份验证器LOGIN返回了预期的响应代码235,但得到的代码为“ 535”,消息为“ 535 5.7.3身份验证失败[LO2P265CA0268.GBRP265.PROD.outlook.com]◀ ”。Authenticator XOAUTH2返回了预期的响应代码235,但得到的代码为“ 535”,并显示消息“ 535 5.7.3身份验证失败[LO2P265CA0268.GBRP265.PROD.outlook.com]◀ ”。 “”“
我该如何解决?
谢谢
解决方法
请将此代码写入环境文件中
使用您的smtp邮件代替smtp.office365.com
MAIL_DRIVER=smtp
MAIL_HOST=smtp.office365.com
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=testing
MAIL_ENCRYPTION=tls
然后运行命令
php artisan config:cache