phpMailer没有到达Hotmail? [英] phpMailer not arriving in Hotmail?

查看:97
本文介绍了phpMailer没有到达Hotmail?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

设置SPF记录后,我仍然在这里验证为什么我无法将此电子邮件接收到hotmail帐户.我能够将其发送到gmail,没有任何问题.请确认代码是否正确以及SPF记录是否正确:

After setting up SPF Record i still am here to verify why i cannot recieve this email to hotmail account. I am able to send it to gmail with no issues. Please confirm if the code is correct, and SPF record is correct:

<?php 

require_once 'PHPmailer/class.phpmailer.php';
$mail = new PHPMailer();


$body = "Thankyou for your Purchase. <br/><br/> Here is your Policy! You are now Protected during your Travels.";

$mail->AddAddress('$payer_email');
$mail->From = "noreply@example.com";
$mail->FromName = "Name";
$mail->Subject = "Thankyou for Your Purchase";
$mail->MsgHTML($body);
$mail->AddAttachment("tosend/xxx.pdf");
if(!$mail->Send()) {
echo "There was an error sending the message";
    $sql = "UPDATE purchases SET policy_sent = 'Not Sent' WHERE id = '$lastid' ";
    $stmt = $mysqli->query($sql);
    $mysqli->close();
exit;
}
echo "Message was sent successfully";
$sql = "UPDATE purchases SET policy_sent = 'Sent', email_to = '$payer_email' WHERE id = '$lastid'";
$stmt = $mysqli->query($sql);
$mysqli->close(); 
?>

这是SPF:

v=spf1 a mx include:secureserver.net ~all

所有这些配置正确吗?

推荐答案

出现了同样的问题.我已经检查了整个脚本30次.每个设置每个.并且,检查并重新检查的dns记录dkim和spf 100次.

Had the same issue. I have checked the whole script 30 times. Each setting each . and , Checked and rechecked dns records dkim and spf 100 times.

什么都没做.

关于此问题,我通过电子邮件发送了hotmail/outlook/live.我没想到会得到任何帮助,但几个小时后问题就解决了.

I e-mailed hotmail/outlook/live about the issue. I didn't expect any help but within a few hours the problem was solved.

它不在脚本中. Hotmail仅阻止通过大多数网页发送的任何电子邮件.即使您的垃圾邮件信誉很好.他们已将服务器的IP列入白名单,问题已解决.

It wasn't in the script. Hotmail just blocks any e-mail that is sent trough most webpages. Even if your spam reputation is fine. They have placed the server's ip on a whitelist and the problem was solved.

如果发现不良行为,他们可以将其改回来.发送电子邮件是有限制的.如果您的服务器信誉不好,则不太可能将服务器添加到白名单中.这可能是共享主机程序包上的一个问题.您托管网站的同一台服务器上的其他人可以提高服务器的声誉.

They can change it back if they detect bad behavior. There's a limit for sending e-mail. If your server has a bad reputation they aren't likely to add the server to their whitelist. This can be an issue on shared hosting packages. Someone else on the same server where you host your website can f up the servers reputation.

这篇关于phpMailer没有到达Hotmail?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆