我有一个发送确认电子邮件的网站。当我直接向我的 gmail 帐户或工作帐户发送电子邮件时,它会按预期显示,但是,当它通过另一个通过 godaddy 或通过 Network Solutions 注册的电子邮件地址时,它会显示如下:
Reply-To: tom@yahoo.com
Content-Type: text/html; boundary="PHP-alt-cabc44cdb6c49a722d25637d7407d89c"
Message-Id: <20121024134543.9B59E10076@server1.serverdomain.com>
Date: Wed, 24 Oct 2012 08:45:43 -0500 (CDT)
<html><body><h1>You have been registered for Future Event</h1><div><b>Date:</b> March 4th, 2013</div><div><b>Time:</b> 12:00am</div><div><p>Come one come all. Step into the future</p></div><div><a href="http://example.com/create_ical/?m=6ea267734713bd10" target="_blank">Download to your calendar</a></div><a href="http://www.example.com/adtracking/?a=532ff9c94b851df4&l=http://www.example.com/?x=ad" target="_blank" style="border-width:0px; margin-left:auto; margin-right:auto; display:block; margin-top:20px;"><img src="http://www.example.com/i/ads/57db2ce3d22e4636_ad_mrc_300_250.jpg" style="border-width:0px; margin-left:auto; margin-right:auto; display:block; margin-top:20px;"></a></body></html>
Godaddy基本上说这是我的错,他们不负责任。
这就是我设置标题的方式:
$_HEADERS = "From: " . $_HOST["email"] . "\r\nReply-To: " . $_HOST["email"] . "";
$_HEADERS .= "\r\nContent-Type: text/html; boundary=\"PHP-alt-".$_random_hash."\"";
这是完整的电子邮件:
Delivered-To: through-godaddy-to-my-account-at@gmail.com
Received: by 10.58.227.40 with SMTP id rx8csp526380vec;
Wed, 24 Oct 2012 06:46:02 -0700 (PDT)
Received: by 10.52.90.212 with SMTP id by20mr22114953vdb.118.1351086361703;
Wed, 24 Oct 2012 06:46:01 -0700 (PDT)
Received-SPF: pass (google.com: best guess record for domain of server1.serverdomain.com designates 66.18.17.26 as permitted sender) client-ip=66.18.17.26;
Message-ID: <5087f119.9bcfdc0a.6321.234eMFETCHER_ADDED@google.com>
Received: by 10.220.207.155 with POP3 id fy27mf482750vcb.7;
Wed, 24 Oct 2012 06:46:01 -0700 (PDT)
X-Gmail-Fetch-Info: email-at-godaddy@example.com 1 pop.secureserver.net 110 email-at-godaddy@example.com
Received: (qmail 13064 invoked by uid 30297); 24 Oct 2012 13:45:46 -0000
Received: from unknown (HELO m1pismtp01-016.prod.mesa1.secureserver.net) ([10.8.12.16])
(envelope-sender <apache@server1.serverdomain.com>)
by p3plsmtp14-04.prod.phx3.secureserver.net (qmail-1.03) with SMTP
for <email-at-godaddy@example.com>; 24 Oct 2012 13:45:46 -0000
X-IronPort-Anti-Spam-Result: ApIxAH/wh1BCEhEa/2dsb2JhbABEghiJdKNaMQEBkGdwgQiCGoEzID4ZASqFSQeCGAkBAw8LmXGPHId3ASOVAmeDSYIegQYDlCKCaIQihXCFEA
Received: from server1.serverdomain.com ([66.18.17.26])
by m1pismtp01-016.prod.mesa1.secureserver.net with ESMTP; 24 Oct 2012 06:45:45 -0700
Received: by server1.serverdomain.com (Postfix, from userid 48)
id 9B59E10076; Wed, 24 Oct 2012 08:45:43 -0500 (CDT)
To: email-at-godaddy@example.com
Subject: You have successfully registered for Future Event
From: tom@yahoo.com
X-Nonspam: None
Date: Wed, 24 Oct 2012 06:46:01 -0700 (PDT)
Reply-To: tom@yahoo.com
Content-Type: text/html; boundary="PHP-alt-cabc44cdb6c49a722d25637d7407d89c"
Message-Id: <20121024134543.9B59E10076@server1.serverdomain.com.com>
Date: Wed, 24 Oct 2012 08:45:43 -0500 (CDT)
<html><body><h1>You have been registered for Future Event</h1><div><b>Date:</b> March 4th, 2013</div><div><b>Time:</b> 12:00am</div><div><p>Come one come all. Step into the future</p></div><div><a href="http://example.com/create_ical/?m=6ea267734713bd10" target="_blank">Download to your calendar</a></div><a href="http://www.example.com/adtracking/?a=532ff9c94b851df4&l=http://www.example.com/?x=ad" target="_blank" style="border-width:0px; margin-left:auto; margin-right:auto; display:block; margin-top:20px;"><img src="http://www.example.com/i/ads/57db2ce3d22e4636_ad_mrc_300_250.jpg" style="border-width:0px; margin-left:auto; margin-right:auto; display:block; margin-top:20px;"></a></body></html>