Pair.net 最近升级了我们的 PHP 安装,之后客户端开始在电子邮件正文中看到 HTML,之前他看到的是格式化的电子邮件正文。
我将自己添加为抄送,我的 Outlook 向我显示了格式化的正文,但在同一封电子邮件中他看到了代码。
有人遇到过这个吗?
有什么提示吗?
代码如下:
$headers = "From: $name <$email>\r\n" .
"Reply-To: $email\r\n" .
"X-Mailer: PHP/" . phpversion().
'MIME-Version: 1.0' . "\r\n" .
'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$msg = "<html><body><head><style type='text/css'>TD { font-family: Tahoma, Helvetica, sans-serif, Arial, Verdana; font-weight:bold; }</style></head>";
$msg .="<table width='98%' border='0' cellspacing='8'> etc etc etc
mail("$to, me@myoffice.com", $sub, $msg, $headers);
实际的电子邮件标题如下:
Delivered-To: xxx@xxx.com
Received: by 10.204.63.10 with SMTP id z10cs87437bkh;
Wed, 8 Jun 2011 12:50:43 -0700 (PDT)
Received: by 10.216.230.105 with SMTP id i83mr5392587weq.43.1307562643519;
Wed, 08 Jun 2011 12:50:43 -0700 (PDT)
Return-Path: <anonymous@tinco.pair.com>
Received: from tinco.pair.com (tinco.pair.com [209.68.1.91])
by mx.google.com with SMTP id f69si2172888wes.55.2011.06.08.12.50.42;
Wed, 08 Jun 2011 12:50:43 -0700 (PDT)
Received-SPF: pass (google.com: best guess record for domain of anonymous@tinco.pair.com designates 209.68.1.91 as permitted sender) client-ip=209.68.1.91;
Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of anonymous@tinco.pair.com designates 209.68.1.91 as permitted sender) smtp.mail=anonymous@tinco.pair.com
Received: (qmail 11613 invoked by uid 65534); 8 Jun 2011 19:50:41 -0000
Date: 8 Jun 2011 19:50:41 -0000
Message-ID: <20110608195041.11612.qmail@tinco.pair.com>
To: sales@yyy.com, xxx@xxx.com
Subject: WEBSITE BERG SELECTION FORM
From: David XXX <xxx@xxx.com>
Reply-To: xxx@xxx.com
X-Mailer: PHP/5.3.6MIME-Version: 1.0
Content-type: text/html; charset=iso-8859-1