Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VML base64 image

I use html signature for Outlook 2007. The signature contains a few image file. I want embed image files so it's shouldn't be on attachment. But v:image doesn't show image.

<!--[if gte vml 1]>
    <v:image style="width:104px;height:108px;" src="data:image/jpg;base64,/9j/4AAQSkZ......AgEAgEAgEAgEAgP//Z">
        </v:image>
    <![endif]-->
    <![if !vml]><img width=104 height=108
src="data:image/jpg;base64,/9j/4AAQSkZJR...AICpUuZdbmkMBXsnT3knOxse8nkcs+B4iAtsAgEAgEAgEAgEAgEAgP//Z" alt="footer_logo.jpg" v:shapes="Resim_x0020_4"><![endif]>
like image 221
Mert Emir Avatar asked Feb 06 '26 05:02

Mert Emir


1 Answers

Outlook uses Word to render the images, and Word does not support embedded (src="data:image") images. You need to attach the image as a file, set the PR_ATTACH_CONTENT_ID property on the attachment (Attachment.PropertyAccessor.SetProperty), and make sure your HTML refers to the image through the src=cid:xyz attribute (where xyz is the value of the PR_ATTACH_CONTENT_ID property).

PR_ATTACH_CONTENT_ID property DASL name is http://schemas.microsoft.com/mapi/proptag/0x3712001F

like image 92
Dmitry Streblechenko Avatar answered Feb 09 '26 08:02

Dmitry Streblechenko



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!