我正在尝试发送带有一个附件的HTML格式的电子邮件。我收到了电子邮件,附件就在那里,但电子邮件客户端没有显示格式化的HTML。相反,它将HTML显示为:<html><p>Header
等。以下是原始电子邮件(从Gmail转储,匿名):
Delivered-To: test@testnet.com
Received: by 10.151.41.4 with SMTP id t4cs11883ybj;
Thu, 1 Sep 2011 03:39:49 -0700 (PDT)
Received: by 10.213.32.12 with SMTP id a12mr14455ebd.25.1314873588419;
Thu, 01 Sep 2011 03:39:48 -0700 (PDT)
Return-Path: <myaccount@server46.emailerserver.nl>
Received: from server46.emailerserver.nl (server46.emailerserver.nl [91.94.224.162])
by mx.google.com with ESMTPS id i29si371474eei.99.2011.09.01.03.39.47
(version=TLSv1/SSLv3 cipher=OTHER);
Thu, 01 Sep 2011 03:39:47 -0700 (PDT)
Received-SPF: pass (google.com: best guess record for domain of myaccount@server46.emailerserver.nl designates 91.94.224.162 as permitted sender) client-ip=91.94.224.162;
Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of myaccount@server46.emailerserver.nl designates 91.94.224.162 as permitted sender) smtp.mail=myaccount@server46.emailerserver.nl
Received: from server46.emailerserver.nl (localhost [127.0.0.1])
by server46.emailerserver.nl (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p81Adk3n031256
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
for <test@testnet.com>; Thu, 1 Sep 2011 12:39:46 +0200
Received: (from myaccount@localhost)
by server46.emailerserver.nl (8.14.3/8.14.3/Submit) id p81Adk6H031255;
Thu, 1 Sep 2011 12:39:46 +0200
Date: Thu, 1 Sep 2011 12:39:46 +0200
Message-Id: <201109011039.p81Adk6H031255@server46.emailerserver.nl>
To: test@testnet.com
Subject: easyfit - ref: Giling, Monique
X-PHP-Script: www.testserver.nl/emailer/upload2.php for 214.84.68.162
From: "sender@mynet.com" <sender@mynet.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="5a9be80f0926fcc0a9903df316874b01"
Content-Disposition: attachment
Content-type: text/html; charset="iso-8859-1"
X-Virus-Scanned: by amavisd-new
This is a multi-part message in MIME format.
--5a9be80f0926fcc0a9903df316874b01
Content-Transfer-Encoding: 7bit
<html><head></head><body><h2>easyfit bestelling</h2><p><i>Datum: donderdag 1 september 2011</i></p><h3><p>Van</p></h3><p>TEST ()<br>12<br>1<br>1, 1<br>1<br>sender@mynet.com<br></p><p><h3>Bestelling</h3></p><table><tr><td width="250" colspan="2"><b>Indivisual (R)</b></td><td width="250" colspan="2"><b>Indivisual (L)</b></td></tr><tr><td><i>Materiaal</i></td><td>Silicone hydrogel</td><td><i>Materiaal</i></td><td>Silicone hydrogel</td></tr><tr><td><i>Radius</i></td><td>8,30</td><td><i>Radius</i></td><td>8,30</td></tr><tr><td><i>Sterkte</i></td><td>+1,00</td><td><i>Sterkte</i></td><td>+1,00</td></tr><tr><td><i>Diameter</i></td><td>14,00</td><td><i>Diameter</i></td><td>14,00</td></tr><tr><td><i>Aantal</i></td><td>1 (3 maanden)</td><td><i>Aantal</i></td><td>1 (3 maanden)</td></tr></tr></table><p>Referentie: Giling, Monique<br>Opmerkingen: asdsd<br></p><br><br><br><p><i>------------------------------------<br>easyfit 2.620 / ComputerCode=43C3-427F-4457-35F6-3F0D / OrderId=7a797654-58a1-4!
7f9-bd66-417562423de6</i></p></body></html>
--5a9be80f0926fcc0a9903df316874b01
Content-Type: application/octet-stream; name=MenOrder.xml;
Content-Transfer-Encoding: base64
Content-disposition: attachment
PD94bWwgdmVyc2lvbj0iMS4wIj8+DQo8IS0tR2VuZXJhdGVkIGJ5IGVhc3lmaXQgdmVyc2lvbiAy
LjYyMCBvbiAxLTktMjAxMSAxMjozOTo0NS0tPg0KPCEtLUNvbXB1dGVyIGNvZGU6IDQzQzMtNDI3
Ri00NDU3LTM1RjYtM0YwRCwgT1M6IE1pY3Jvc29mdCBXaW5kb3dzIE5UIDUuMS4yNjAwIFNlcnZp
Y2UgUGFjayAzIC0tPg0KPCEtLUludm9pY2UgdG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gICAgPFJsTGVuc0xlZnQ+DQogICAgICAg
IDxPbFBySWQ+MTA0ODEyMjA8L09sUHJJZD4NCiAgICAgICAgPE9sQkNSZmxhdD44LjMwPC9PbEJD
UmZsYXQ+DQogICAgICAgIDxPbFNwaGVyZT4xLjAwPC9PbFNwaGVyZT4NCiAgICAgICAgPE9sRGlh
bWV0ZXI+MTQuMDA8L09sRGlhbWV0ZXI+DQogICAgICAgIDxPbFF1YW50aXR5PjM8L09sUXVhbnRp
dHk+DQogICAgICA8L1JsTGVuc0xlZnQ+DQogICAgPC9PckxlbnM+DQogIDwvTWhPcmRlcj4NCjwv
TWVzc2FnZUhlYWRlcj4=
--5a9be80f0926fcc0a9903df316874b01--
知道这封电子邮件有什么问题吗?
答案 0 :(得分:0)
你有两个Content-Type
标题,第一个是正确的标题,它告诉正文包含多个部分。
第二个应该在HTML部分:
Content-Transfer-Encoding: 7bit
Content-type: text/html; charset="iso-8859-1"
<html>…