$to = "$email";
$subject = "Thank You";
$message = "<p>Thanks for applying</p>";
$from = "[email protected] /cdn-cgi/l/email-protection";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
当我向自己发送这封电子邮件时,我仍然看到 html 标签,这是为什么,谢谢!!
您需要发送Content-type
标头为text/html
.
例如,更改$headers
line to
$headers = "From: $from";
$headers .= "\nContent-type: text/html";
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)