我正试图使用函数mail()发送富文本,其中包含链接;我正在发送如下代码...
Please, access <a href="http://www.site.md/contact/en/"> Contact </a> to send all these information
我抛出了一个Firebug,发现链接标签已被移除,代码变成了这样
Please, access <a>Contact</a> to send all these information
我需要这个脚本,在禁止违规者后,发送电子邮件告知他们被禁止的原因。 在其他电子邮件服务中,邮件没有问题,但是我犯了什么错误,请原谅我的英文。下面是发送电子邮件的脚本的一部分,这是重要的部分:
// Set and wordwrap message body
$body = "From: $name\n\n";
$body .= "Message: $message";
$body = wordwrap($body, 70);
// Build header
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$headers .= "From: $email\n";
if ($cc == 1) {
$headers .= "Cc: $email\n";
}
$headers .= "X-Mailer: PHP/Contact";
// Send email
if(!@mail($to, $subject, $body, $headers)) {
echo '<b> ERROR ! </b> Unfortunately, a server issue prevented delivery of your message<br />'; }