PHPMailer无法将邮件发送到@ hotmail.com / @ live.com

时间:2014-12-12 02:13:34

标签: php email hotmail

在我的网站中,我使用PHPMailer向客户发送自动邮件。该网站托管在GoDaddy共享托管服务器上,并使用Google Apps作为邮件服务(myserver.com)。 SPF记录随myserver.com一起添加。

最近有很多来自@ hotmail.com,@ live.com.au,@ live.co.uk,@ live.com客户的投诉,他们没有从网站收到任何邮件。

我使用以下代码发送邮件

代码1 - 使用SMTP

$mail = new PHPMailer;
$mail->isSMTP();
$mail->SMTPDebug = 0;
$mail->Host = 'localhost';
$mail->Port = 25;
$mail->SMTPSecure = 'none';
$mail->SMTPAuth = false;
$mail->setFrom('confirmation@myserver.com', 'Confirmation[My Server]');
$mail->addReplyTo('info@myserver.com', 'My Server');
$mail->addAddress($client_mailid, $client_mailid);
$mail->Subject = $client_mail_sub;
$mail->msgHTML($newbody);

//send the message
if (!$mail->send()) {
    log_entry($mail->ErrorInfo, MAIL_ERR_LOG);
} else {
    log_entry("Mail sent to ". $client_mailid , MAIL_GEN_LOG);
}

我也尝试过以下代码

代码2 - 没有SMTP

$mail = new PHPMailer;
$mail->setFrom('confirmation@myserver.com', 'Confirmation[My Server]');
$mail->addReplyTo('info@myserver.com', 'My Server');
$mail->addAddress($client_mailid, $client_mailid);
$mail->Subject = $client_mail_sub;
$mail->Host = "myserver.com";
$mail->msgHTML($newbody);

//send the message
if (!$mail->send()) {
    log_entry($mail->ErrorInfo, MAIL_ERR_LOG);
} else {
    log_entry("Mail sent to ". $client_mailid , MAIL_GEN_LOG);
}

我的代码有问题吗? 如果没有问题可能是这个问题的原因?

我已多次搜索以获得以下问题的一个解决方案,尝试了很多解决方案并且对我没有任何作用。如果这是一个重复的问题,我很抱歉。

感谢您的帮助。

EDIT 添加了标题信息

Delivered-To: abc@gmail.com
Received: by 10.96.137.33 with SMTP id qf1csp1412957qdb;
        Wed, 17 Dec 2014 06:47:28 -0800 (PST)
X-Received: by 10.66.124.225 with SMTP id ml1mr5209349pab.142.1418827647092;
        Wed, 17 Dec 2014 06:47:27 -0800 (PST)
Return-Path: <confirmation@myserver.com>
Received: from sg2nlshrout01.shr.prod.sin2.secureserver.net (sg2nlshrout01.shr.prod.sin2.secureserver.net. [182.50.132.193])
        by mx.google.com with ESMTP id it2si5932112pbb.105.2014.12.17.06.47.24;
        Wed, 17 Dec 2014 06:47:26 -0800 (PST)
Received-SPF: pass (google.com: domain of confirmation@myserver.com designates 182.50.132.193 as permitted sender) client-ip=182.50.132.193;
Authentication-Results: mx.google.com;
       spf=pass (google.com: domain of confirmation@myserver.com designates 182.50.132.193 as permitted sender) smtp.mail=confirmation@myserver.com
Received: from sg2nlhg144.shr.prod.sin2.secureserver.net ([182.50.130.216])
    by sg2nlshrout01.shr.prod.sin2.secureserver.net with bizsmtp
    id Uen91p0094gGj8e01en9ff; Wed, 17 Dec 2014 07:47:09 -0700
Received: from www.myserver.com (localhost [127.0.0.1])
    by sg2nlhg144.shr.prod.sin2.secureserver.net (8.14.4/8.12.11) with ESMTP id sBHElOQA024281;
    Wed, 17 Dec 2014 07:47:24 -0700
Date: Wed, 17 Dec 2014 14:47:24 +0000
To: "Confirmation[My Server]" <confirmation@myserver.com>,
        "My Server" <info@myserver.com>
From: "Confirmation[My Server]" <confirmation@myserver.com>
Reply-To: "My Server" <info@myserver.com>
Subject: XXXXXXXXXXXXXXXXXXXXXX.
Message-ID: <209589041f9f422b4a259b3796e90cbc@www.myserver.com>
X-Priority: 3
X-Mailer: PHPMailer 5.2.9 (https://github.com/PHPMailer/PHPMailer/)
MIME-Version: 1.0
Content-Type: multipart/alternative;
    boundary="b1_209589041f9f422b4a259b3796e90cbc"
Content-Transfer-Encoding: 8bit

--b1_209589041f9f422b4a259b3796e90cbc
Content-Type: text/plain; charset=us-ascii

To view the message, please use an HTML compatible email viewer!


--b1_209589041f9f422b4a259b3796e90cbc
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

0 个答案:

没有答案
相关问题