delphioutlookoutlook-object-model

Delphi to display embedded image in outlook msg


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.


Solution

  • Embedded images in HTML mail come with src="cid:xx" attribute where xx 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 the src attribute of the img element to point to the temporary image file. An alternative to "serve" images to the browser through an asynchronous pluggable protocol is described here.