邮件没有被hotmail.com收到 [英] Mail not being received by hotmail.com

查看:553
本文介绍了邮件没有被hotmail.com收到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某些原因,我可以在yahoo.com收到以下代码的电子邮件,但不能使用hotmail.com?有人可以解释一下吗?

For some reason I can receive email with the following code at yahoo.com, but not hotmail.com?? Can somebody please explain?

$usr = "bob@hotmail.com";
$subject = "Test Email";
$from = "noreply@test.com";
ini_set("sendmail_from", $usr);
$message = "<html><body style=\"font-family: Tahoma, Verdana, Arial; font-size: 12px; color: #444;\">
        <h1 style=\"font-family: Tahoma, Verdana, Arial; font-size: 16px; color: #111;\">This is an email</h1>
        <span style=\"background: #CCC; display: block; padding: 20px;\"><br><br>
        <b>This is a test.</b></body></html>";
$headers  = "MIME-Version: 1.0" . PHP_EOL;
$headers .= "Content-Type: text/html; charset=ISO-8859-1" . PHP_EOL;
$headers .= "From: Test.com<$from>" . PHP_EOL;
mail($usr, $subject, $message, $headers);
echo "<b>to:</b>$usr<br>";
echo "<b>subject:</b>$subject<br>";
echo "<b>msg:</b>$message<br>";
echo "<b>headrs:</b>$headers<br>";

我尝试过很多次,什么都没有。但是它与yahoo.com一起工作。

I tried it many times, and nothing. But it worked straight away with yahoo.com.

注意:没有垃圾邮件,垃圾邮件或任何收到的内容。我没有收到我的iPhone上的电子邮件,这是连接到该帐户。 :(

Note: There is no junk, spam, or anything being received. I do not get the email on my iPhone either which is linked up to that account. :(

推荐答案

可能垃圾邮件过滤器起作用,因为某些标题尚未传递到其满意度

It is probably the spam-filters acting up, due to some header that hasn't been passed to its satisfaction.

而不是编写自己的邮件脚本的实现,您可以使用一些已测试的现有脚本,如 PHPMailer

Instead of writing your own implementation of a mailer script, you could use one of the tested existing ones like PHPMailer.

这篇关于邮件没有被hotmail.com收到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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