我已經寫了一個代碼發送郵件在雅虎或gmail.Mail發送在Gmail上,但我沒有看到任何郵件在雅虎郵件。並在Gmail中,我看到所有的HTML內容與消息。 這裏是我的代碼...郵件功能不工作雅虎郵件編號
$headers = "From: \"".$from_name."\" <".$from_email.">\n";
$headers .= "To: \"".$to_name."\" <".$to_email.">\n";
$headers .= "Return-Path: <".$from_email.">\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: text/HTML; charset=ISO-8859-1\n";
// message
$message = '
<html>
<head>
<title>Registration</title>
</head>
<body>
<table><tr>
<td> <a href="#'> Click Here To Activate Your account</a>
Thanks To visit site.com
</td>
</tr>
</table>
</body>
</html>';
if(mail('', $subject, $message, $headers))
echo "successfully register !! please check your mail and clik on confirmation link";
歡迎來到SO。請指定您嘗試從哪個服務器發送的內容,特別是您用作'from_email'的內容。 – 2010-05-29 19:19:59