出于某种原因,我可以在 yahoo.com 上收到带有以下代码的电子邮件,但不能在 hotmail.com 上收到?有人可以解释一下吗?
$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 合作。
注意:没有收到垃圾邮件、垃圾邮件或任何东西。我的 iPhone 上也没有收到与该帐户相关联的电子邮件。:(