我面臨着一些問題,電子郵件發送,我正在探索波紋管腳本其他服務器。發送電子郵件問題與
try
{
$mail->Host = "mail.xyz.com"; // SMTP server
$mail->SMTPDebug = 1; // enables SMTP debug information (for testing)
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->Port = 25; // set the SMTP port for the GMAIL server
$mail->Username = "[email protected]"; // SMTP account username
$mail->Password = "mypassword"; // SMTP account password*/
$mail->SetFrom($from, $fromName);
$mail->AddAddress($to, $toName);
$mail->Subject = $subject;
$mail->AddReplyTo('[email protected]', 'xyz title');
$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically
$mail->MsgHTML($body);
$mail->IsHTML(true); // send as HTML
$success = $mail->Send();
}
catch (phpmailerException $e)
{
echo $e->errorMessage();
}
catch (Exception $e)
{
echo $e->getMessage();
}
return $success;
**我使用這個代碼的PHPMailer發送電子郵件它的正常工作向我
-
但是當我將郵件發送到hotmail,如[email protected]或[email protected],然後發送到垃圾郵件文件夾。什麼應該是問題?此外,當我試圖在我公司的服務器一樣[email protected]發送電子郵件,然後得到以下錯誤:**
--------------------- -------原始郵件---------------------------- 主題:郵件投遞失敗:將郵件退回給發件人 從:「郵件傳遞系統」 日期:星期一,2013年10月7日下午6時23 要:[email protected]
是由郵件傳遞軟件自動創建該消息。
您發送無法交付給一個或多個其 收件人的消息。這是一個永久性錯誤。以下地址失敗:
[email protected] SMTP error from remote mail server after MAIL FROM:<[email protected]> SIZE=1872: host xyztechnologies.com [173.37.185.97]: 550 Access denied - Invalid HELO name (See RFC2821 4.1.1.1)
------這是郵件的副本,包括所有標題。 ------
返回路徑: 接收:從本地主機([127.0.0.1]:47913 HELO = www.xyz.com) 通過齒條與esmtpa(進出口4.80.1) (envelope-從) ID 1VT8up-0007gh-UD 爲[email protected]; Mon,07 Oct 2013 18:23:55 +0700 Received:from 122.177.170.230([122.177.170.230])(代表10.1.1.12) (SquirrelMail authenticated user [email protected]) by www。 xyz.com與HTTP; 星期一,2013年10月7日18時23分55秒0700 郵件ID:< [email protected]> 日期:星期一,2013年10月7日18時23分55秒0700 主題:測試來自網絡郵件 來自:[email protected] 到:[email protected] 用戶代理:SquirrelMail的/ 1.4.22 MIME-版本:1.0 內容類型:文本/無格式;字符集= ISO-8859-1 內容傳輸編碼:8位 X優先:3(正常) 重要性:普通
TEsst2
應該是什麼問題?我無法找到任何解決方案。請幫幫我。 感謝