在 HTML 电子邮件中嵌入附加图像 [英] Embedding attached images in HTML emails

查看:47
本文介绍了在 HTML 电子邮件中嵌入附加图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我将图像附加到电子邮件中,如何将其放置在 HTML 内容中?我尝试仅使用文件名作为图像源,但这似乎不起作用.

If I attach an image to an email, how can I place it in the HTML content? I tried just using the filename as the image source but that doesn't seem to work.

推荐答案

更具体地说明如何构建 HTML 邮件消息.

Be more specific on how you build the HTML mail message.

结果将是一个多部分 MIME 消息,其中包含一个 text/html 部分(如果你真的用 text/plain 类型的替代部分正确地做到了这一点)和几个图像,然后从 HTML 中引用这些图像.

The result will be a multipart-MIME message with a text/html part (if you really do it right with an alternate part of type text/plain) and several images, which are then referenced from within the HTML.

请参阅 RFC 1813RFC 2378 有关混合 MIME 和相关数据中的内容 ID 的更多信息(在 HTML 源中由 CID 引用).

See RFC 1813 and RFC 2378 for more information about content-id in mixed MIME and related data (referred by CID in the HTML source).

这篇关于在 HTML 电子邮件中嵌入附加图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆