Delphi在outlook msg中显示嵌入图像
我正在 Delphi 2010 中阅读 Outlook 消息文件,并在 twebbrowser 中显示消息的 html 正文。但它不显示嵌入的图像。热衷于在 Outlook 消息中显示嵌入图像?我正在使用导入的对象库。
I am reading outlook msg files in Delphi 2010 and displaying the html body of a message in a twebbrowser. It does not however display the embedded image. Hot to display embedded images in outlook message? I am using the imported object library.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
HTML 邮件中的嵌入图像带有
src="cid:xx"
属性,其中xx
是图像部分的内容 ID(Content-Type: application/octet -stream; Content-Disposition: inline
) 在多部分 MIME 消息中。您可以解码该部分并将其保存到临时文件,并修复img
元素的src
属性以指向临时图像文件。描述了通过异步可插入协议向浏览器“提供”图像的替代方法此处。Embedded images in HTML mail come with
src="cid:xx"
attribute wherexx
is the content ID of the image part (Content-Type: application/octet-stream; Content-Disposition: inline
) in the multi-part MIME message. You could decode and save that part to a temporary file and fix up thesrc
attribute of theimg
element to point to the temporary image file. An alternative to "serve" images to the browser through an asynchronous pluggable protocol is described here.您可以使用 IHTMLDocument2 接口来为您完成这项工作:
(请参阅:http://k210.org/delphi/internet/23/ - 创建 IHTMLDocument2运行时)
You could use the IHTMLDocument2 interface to do the work for you:
(see: http://k210.org/delphi/internet/23/ - create IHTMLDocument2 runtime)