【发布时间】:2012-04-05 01:02:55
【问题描述】:
我将以下内容用于$headers:
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$headers .= "From: " . $from . "\r\n";
$headers .= "Reply-To: ". $from . "\r\n";
$headers .= "CC: me@site.com\r\n";
我的 html 在 Gmail 中看起来不错,但在 Outlook 中显示为原始 html。
我是否忘记了标题中的某些内容?
【问题讨论】:
-
你的outlook允许显示html吗?由于 Outlook 自己的富文本格式足够好,企业有时会禁用它并且不会注意到
-
你应该使用像 SwiftMailer 这样的 Mail 类。
-
@Louis - 是的,我可以接收 HTML
-
查看类似问题的解决方案:stackoverflow.com/a/2423592/1012061
-
可能想读一读……heavyworks.net/blog/posts/…