我正在尝试发送通知电子邮件(工作正常)但添加了html标头以尝试发送链接等...由于某种原因什么都没有显示,只是空白区域所需的链接成为。这是我的代码:
if(isset($_POST['commentBlogSubmit']) && $auth) {
$query = "SELECT `Email` FROM `Users` WHERE `id` = '" . $prof->id . "'";
$request = mysql_query($query,$connection) or die(mysql_error());
$result = mysql_fetch_array($request);
$Email = $result['Email'];
$to = $Email;
$subject = "Someone sent you left you a comment";
$message = "You have a new blog comment <br />".
" <a href='http:www.blah.org/indexNew.php'></a>";
$from = "info@blah.org";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= "From: $from";
mail($to, $subject, $message, $headers);
}
答案 0 :(得分:10)
也许是因为你在链接标签里面没有文字?
答案 1 :(得分:0)