更新时间:2023-09-20 09:12:04
您不能将base64 src转储到电子邮件的正文中,您必须像附件一样对待它。使用内容标题代替src。以下是Gmail的Gmail代码片段。
You can't dump the base64 src into the body of the email, you have to treat it like an attachment. Use a content header in place of the src. Here's a snippet of how gmail does it.
电子邮件内容头
Content-Type: image/png; name="InlineImage.png"
Content-Disposition: inline; filename="InlineImage.png"
Content-Transfer-Encoding: base64
Content-ID: <ii_ikqclluk0_152ed84122ba57fd>
X-Attachment-Id: ii_ikqclluk0_152ed84122ba57fd
--base64 here--
HTML
<img src="cid:ii_ikqclluk0_152ed84122ba57fd">