Closed krugertech closed 5 months ago
This is not how you embed inline images. You need to add an image tag into your html and set the image source to cid:[the id you have given your inline image]
It will be something like this
<img src="cid:some-image-cid" />
When your msg file is opened by Outlook it will see that the source begins with cid (Content ID) and then reads the id that is behind the : ... it will then search if there are any inline attachments with this id and use that image to display.
<html>
<head>
<title>Peter Pann</title>
</head>
<body>
<b>Hello Neverland html</b><br/>
<img src="cid:img.jpg">
</body>
</html>
Hi There. Thanks for this great library.
When I create a new email and embed/inline an image, the image does not seem to appear when viewing the .msg file in Outlook.
OutlookSpy can detect the image attachment though.
Here is the code I used. I tested different .jpg files and tried setting different rendering positions in an effort to get the embedded image to display in Outlook without success.