【发布时间】:2015-08-15 09:17:32
【问题描述】:
我们已从 Comcast 切换到 Office 365,以便从我们的 Web 应用程序发送电子邮件。我正在使用 ZF v1.12 中的 Zend_Mail_Transport_Smtp。从 Comcast 凭据切换到 Office 365 凭据后,我现在无法发送邮件。这是我的代码...
$config = array('auth' => 'login',
'ssl' => 'tls',
'username' => 'office365username',
'password' => 'office365password',
'port' => 587);
$transport = new Zend_Mail_Transport_Smtp('smtp.office365.com', $config);
现在尝试发送电子邮件会导致以下错误消息:
5.7.60 SMTP; Client does not have permissions to send as this sender
我知道这个帐户可以发送消息。我有一些使用 PhpMailer 的批处理作业,它们运行良好。 Zend_Mail 中必须有一些我缺少的设置。我真的不想重写我的电子邮件模型来使用 PhpMailer,但是我已经没有时间解决这个问题了。
【问题讨论】:
标签: php zend-framework smtp office365 zend-mail