本文介绍了Laravel使用Office 365电子邮件发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已从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_ADDRESSMAIL_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电子邮件发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 18:39