我正在使用下面的代码。当我发送带有此代码的邮件时,它会转到垃圾邮件..我检查了我的服务器,它不在黑名单中。我也发送来自From:has的同一域的邮件。任何想法为什么会发生这种情况?
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= "From: Spor101 <info@example.com>\r\n";
$headers .= "Reply-To: info@example.com\r\n";
$headers .= "Return-Path: info@example.com\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
$headers .= "X-Priority: 3\r\n";
$headers .= "X-Mailer: PHP".phpversion()."\r\n";
$to = "abc@aaa.com";
$subject = "New Mail";
$message = "hello";
mail($to,$subject,$message,$headers);