问题描述
我们已从gmail更改为Office 365,但问题是:发送电子邮件时出现Client does not have permissions to send as this sender
550.
We've changed from gmail to office 365, but the issue: Client does not have permissions to send as this sender
550 when sending email.
我们在Office 365邮件服务中是否有任何配置可以启用从网站/应用程序发送电子邮件的功能?
Do we have any configuration in office 365 mail service to enable sending email from website/application?
这是我的.env
配置:
MAIL_DRIVER=smtp
MAIL_HOST=smtp.office365.com
MAIL_PORT=587
MAIL_USERNAME=mail_username
MAIL_PASSWORD=mail_password
MAIL_ENCRYPTION=tls
推荐答案
您应配置与Office 365电子邮件地址匹配的正确的from
电子邮件地址.
You should configure the correct from
email address, that matches to your Office 365 Email Address.
您可以在 config/mail.php from
选项或这些环境变量MAIL_FROM_ADDRESS
和MAIL_FROM_NAME
中对其进行配置.
You can configure it in config/mail.php from
option or these env variables MAIL_FROM_ADDRESS
and MAIL_FROM_NAME
.
另请参阅:
这篇关于Laravel使用Office 365电子邮件发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!