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