请教PHP用MAIL函数发邮件的问题,谢谢想实现网站自动给注册的会员发邮件的功能,用了MAIL函数。163邮箱接收正常,可是QQ邮箱会自动当做垃圾邮件,怎么解决?我的测试代码如下:<?php
$to="[email protected]";
$subject="邮件标题!";
$subject = "=?UTF-8?B?".base64_encode($subject)."?=";
$message="
<html>
<head>
<title></title>
</head>
<body>邮件内容</body>
</html>
";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers.= "Content-type:text/html;charset=utf-8" . "\r\n";
$headers .= 'From:[email protected]' . "\r\n";
//$headers .= 'Cc: [email protected]' . "\r\n";//抄送
mail($to,$subject,$message,$headers);//执行EMAIL发送
?>