$to = "$email";
$subject = "Thank You";
$message = "<p>Thanks for applying</p>";
$from = "solomon@kornar.com";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
当我发送这封电子邮件给自己时,我仍然看到html标签,为什么这是谢谢!!
答案 0 :(得分:4)
您需要将Content-type
标题发送为text/html
。
例如,将$headers
行更改为
$headers = "From: $from";
$headers .= "\nContent-type: text/html";
答案 1 :(得分:1)
您需要设置标头内容类型。像:
$headers.= 'Content-type: text/html; charset=UTF-8' . "\r\n";