带有附件的 HTML 电子邮件
我的一个朋友希望我帮助他制作一个包含页眉和页脚图像的 HTML 电子邮件模板。
最初我认为创建一个表格 html 电子邮件很容易,该电子邮件在页眉和页脚的标签内使用远程图像,但是大多数电子邮件客户端默认情况下不会显示这些图像。
一位同事提到了 MIME 和 UUEncoding,但是我找不到如何实现这一点的明确示例。
有人可以给我一个提示,告诉我如何实现我想要做的事情吗?
提前致谢
A friend of mine wants me to help him make a HTML email template that contains a header and footer image.
Originally I thought it would be easy enough to just create a tabular html email that used remote images inside tags for the header and footer, however most email clients will not display these images by default.
A collegue has mentioned MIME and UUEncoding, however I cannot find a clear example of how to achieve this.
Could somebody please give me a hint on how I can achieve what it is I am trying to do.
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,正如 Tripleee 所写,您必须使用一些理解 MIME 的库或客户端。
在多部分/相关 MIME 部分中包含 HTML 正文和引用的图像。
使用 cid 协议引用 HTML 部分中的图像。例如
以下是所包含图片的 MIME 标头示例:
Yes, as tripleee wrote, you have to use some library or client which understands MIME.
Include the HTML body and the referenced images in a multipart/related MIME part.
Refer the images in the HTML part using the cid protocol. For example
Here is an example MIME header for the included picture: