【发布时间】:2013-01-21 13:44:50
【问题描述】:
我正在使用以下代码发送电子邮件,它工作正常
$headers = array (
'From' => $emailAddress,
'To' => $emailDest,
'Subject' => $subject,
'Return-Path' => 'bounce@*****.eu',
'X-Codent' => '['.$codent_header.']',
'X-Ent' => '['.$ent_header.']',
'X-Bzd' => '['.$database.']',
'X-Email' => '['.$email['Email'].']'
);
$hdrs = $mime->headers($headers, true);
$smtp = Mail::factory('smtp',
array ('host' => 'ssl://'.$emailServer,
'auth' => true,
'port' => '465',
'username' => $emailUtilizator,
'password' => $emailParola));
$mail = $smtp->send($emailDest, $hdrs, $body);
但是几天前,该脚本在通过雅虎发送时停止工作。快速检查日志显示发送尝试返回以下错误:
Failed to set sender: bounce@*****.eu [SMTP: Invalid response code received from server (code: 553, response: From address not verified - see http://help.yahoo.com/l/us/yahoo/mail/original/manage/sendfrom-07.html)]
如果我删除 Return-Path,脚本会起作用,但这样做意味着我无法再跟踪电子邮件,也无法获得准确的报告。
该错误仅在与 yahoo 打交道时发生。 Google、live 和其他地址都可以正常工作。
知道如何克服这个问题吗?
【问题讨论】: