【发布时间】:2011-12-01 10:47:21
【问题描述】:
我正在使用以下 php 代码:
$mailacc = "example@example.com";
$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 <noreply@example.com>' . "\r\n";
$mail = mail($mailacc, $subject, $message, $headers);
但是当我删除链接并输入一些文本时它不会发送邮件。为什么我的消息中没有链接? PS:$mailacc 是我的真实邮箱。
谢谢!
【问题讨论】:
-
请问您看到的错误是什么?
-
我没有收到任何错误。它只是收到了我的电子邮件。
-
检查邮件中的垃圾文件夹。
-
可能是这样的邮件被视为垃圾邮件并被阻止。