進出口使用下面的PHP代碼:PHP:發送郵件與鏈接
$mailacc = "[email protected]";
$subject = "Hello";
$message = "
<html>
<head>
<title>Test Mail</title>
</head>
<body>
<p><a href='http://stackoverflow.com'>Open Link</a></p>
</body>
</html>
";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: Noreply <[email protected]>' . "\r\n";
$mail = mail($mailacc, $subject, $message, $headers);
但它dosent發送郵件,當我刪除了鏈接,並把它workes一些文本。爲什麼我的郵件中沒有鏈接? PS:$ mailacc是我真正的電子郵件帳戶。
Thx!
請問你看到什麼錯誤? – Mob
我沒有得到任何錯誤..它只是劑量來到我的電子郵件.. – Linqan
檢查郵件中的垃圾文件夾。 – Mob