我必须发送一封电子邮件,其中包含一张图片和一些文字.我已经可以发送
HTML电子邮件,附上Content-ID的图片:< Picture.jpg>然后将其引用为< img src =“cid:Picture.jpg”alt =“”/>.可爱.
问题 – 许多邮件客户端默认不显示它.例如,默认情况下,GMail仅显示您已向其发送至少两封电子邮件的发件人的图片.我不知道Mozilla Thunderbird,但从客户的抱怨来看,它做了类似的事情 – 图片显示为附件,并没有出现在电子邮件正文中.
我做错了什么/可以做得更好?
这是电子邮件的[审查]副本:
Delivered-To: [censored]
Received: by 10.204.187.8 with SMTP id cu8cs411179bkb;
Wed,4 Jan 2012 05:36:05 -0800 (PST)
Received: by 10.152.106.45 with SMTP id gr13mr25346083lab.9.1325684164222;
Wed,04 Jan 2012 05:36:04 -0800 (PST)
Return-Path:
Received: from [censored] ([censored]. [[censored]])
by mx.google.com with ESMTPS id nq10si44421925lab.26.2012.01.04.05.36.03
(version=TLSv1/SSLv3 cipher=OTHER);
Wed,04 Jan 2012 05:36:03 -0800 (PST)
Received-SPF: pass (google.com: best guess record for domain of [censored] designates [censored] as permitted sender) client-ip=[censored];
Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of [censored] designates [censored] as permitted sender) smtp.mail=[censored]
Received: from [censored] ([censored]) by [censored] ([censored]) with
Microsoft SMTP Server id 8.1.436.0; Wed,4 Jan 2012 15:36:03 +0200
MIME-Version: 1.0
From: [censored]
To: [censored]
Date: Wed,4 Jan 2012 15:36:02 +0200
Subject: Test
Content-Type: multipart/mixed;
boundary="--boundary_1_5d3b21f4-0e5d-4727-a2a2-a49bb2ad5062"
Message-ID:
Return-Path: [censored]
----boundary_1_5d3b21f4-0e5d-4727-a2a2-a49bb2ad5062
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: base64
[snip base64 encoded HTML]
----boundary_1_5d3b21f4-0e5d-4727-a2a2-a49bb2ad5062
Content-Type: image/jpeg; name="Picture.jpg"
Content-Transfer-Encoding: base64
Content-Disposition: attachment
Content-ID:
[snip base64 encoded JPEG]
----boundary_1_5d3b21f4-0e5d-4727-a2a2-a49bb2ad5062--
补充说:对于downvoters – 虽然我确实看到了这个问题的滥用潜力,但事实是这是来自合法的情况.我正在为办公文具供应商制作网站购物网站.客户想要在产品页面中“发送到电子邮件”按钮,以便访问者可以向他们的朋友/老板/其他任何人发送有趣的产品描述.我正在尝试将产品图片包含在电子邮件中.客户抱怨图像没有显示.