脚本宝典收集整理的这篇文章主要介绍了php Mail()和Outlook,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
$subject = "test Email"; $From = "noreply@bob.COM"; ini_set("sendmail_from",$from); $message = "<htML><body bgcolor=\"#DCEEfc\"> Hello<br><br> This is a <b>test</b> email. <br><br><hr> <a href=\"\">Click Here</a> <br><br><hr> <br><br> Thank you for your time,<br><br> </body></html>"; $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-tyPE: text/html\r\n"; $headers .= "From: " . $from . "\r\n"; mail($mail,$subject,$message,$headers);
但是,当我向自己发送电子邮件时,我会在Outlook中看到所有代码.如果我将其发送给其他人,他们会看到HTML.如果我将它发送到我的hotmail,他们会看到HTML.
这是我的展望(2007)的问题,如果是,它是什么,或者我可以在电子邮件中做些什么来保证它正确显示?
请帮忙!
HTML Email not displaying correctly for Godaddy web based mail
更改:
$headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html\r\n"; $headers .= "From: " . $from . "\r\n";
至:
$headers = "MIME-Version: 1.0" . PHP_EOL; $headers .= "Content-Type: text/html; charset=ISO-8859-1" . PHP_EOL; $headers .= "From: SITe<$from>" . PHP_EOL;
谢谢你们的帮助!
以上是脚本宝典为你收集整理的php Mail()和Outlook全部内容,希望文章能够帮你解决php Mail()和Outlook所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。