1
我的脚本发送电子邮件,但它不呈现html标记。我不确定为什么不。为什么不发送发送的邮件的html?
$email = $row['email'];
$mail_body = '<html>
<body>
<p>hello,'.$name.'</p>
<p>this is a testing email </p>
<hr />
<p>by server</p>
</body>
</html>';
$subject = "Better website";
$to = "$email";
$headers = "From: [email protected]\r\n";
$headers .= "Content-Type: text/html\r\n";
$mail_result = mail($to, $subject, $mail_body, $headers);
我想补充的另一件事是,从未使用aol,hotmail,yahoo,gmail或其他任何知名的邮件头,因为godaddy邮件服务器拒绝他们。 – engma 2012-11-03 16:18:16