当我使用 Zend Mail 使用以下代码发送电子邮件时:
$to = array("email1@gmail.com","email2@hotmail.com","email3@yahoo.com");
$msg = file_get_contents("email.html");
$mail = new Zend_Mail ( "UTF-8" );
$mail->setMessageId ( "MyMsg__" . md5 ( microtime () ) );
$mail->addHeader ( "Content-Type", "text/html; charset=UTF-8" );
$mail->setBodyHtml ( $msg );
$mail->setSubject ( "News Letter Test" );
$mail->setReplyTo('newsletter@mydomain.com', 'Some Name');
$mail->addHeader('MIME-Version', '1.0');
$mail->addHeader('Content-Transfer-Encoding', '8bit');
$mail->addHeader('X-Mailer:', 'PHP/'.phpversion());
$mail->setFrom ('newsletter@mydomain.com', 'Some Name');
foreach($to as $ml){
$mail->addTo ( $ml );
}
$mail->send ( $transport );
我在gmail中得到这个:
newsletter@mydomain.com 通过 u4552323.onlinehome-server.com
如何删除这部分:通过 u4552323.onlinehome-server.com
请注意,我有完全的 root 访问权限,这是一个专用服务器,如果问题出在 send_mail 配置或主机中,我该如何更改这部分u4552323.onlinehome-server.com?