无论我做什么,无论我详细说明什么标题,它都不起作用。即使我在标题中插入了内容类型(在消息本身内)。我会发疯的...
php版本:5.2.17
机器:Linux
内核版本:2.6.32-46.1.BHsmp(如果这很重要)
<?php
$headers = "From: <sender@mydomain.com>" . "\n";
$headers .= "MIME-Version: 1.0" . "\n";
$headers .= "http-equiv='Content-Type' content='text/html; charset=iso-8859-1'\r\n";
$emailBody="<html>";
$emailBody .= "<head>";
$emailBody .= "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>";
$emailBody .= "</head>";
$emailBody .= "<body>";
$emailBody .= "Hello Dear, <br><b>Bla Bla</b><br> See you later. <br>Bye.";
$emailBody .= "</body>";
$emailBody .= "</head>";
$emailBody .= "</html>";
mail("<recipient@gmail.com>", "Testing some HTML mail", $emailBody, $headers);
?>
等待 PHP/HTML 专家查看上面的代码。
任何帮助将不胜感激。
非常感谢。