我想用PHP发送html电子邮件。它在gmail,雅虎等上运行良好,但在我的cpanel(部落电子邮件客户端)上,文本正在作为附件提供,并且没有显示任何内容。使用PHP发送HTML电子邮件
这些都是我使用
$headers = "From: " ."XYZ<[email protected]>" . "\r\n";
$headers .= "Reply-To: ". "[email protected]" . "\r\n";
$headers .= "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=us-ascii" . "\r\n";
我也试图改变头的charset
到iso-8859-1
但仍然没有sucess
也许你的cPanel不接受html电子邮件的安全性?只是一个想法... – elclanrs 2012-02-11 02:09:30
现在我删除标题,并再次发送电子邮件收到作为纯文本。但我想html格式化?我在我的头文件中做了什么错误? – 2012-02-11 02:17:09
我认为它与你的cPanel设置有关...... – elclanrs 2012-02-11 02:18:21