我正在使用以下代码发送电子邮件,它工作正常
$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 和其他地址工作正常。
关于如何克服这个问题的任何想法?