VML base64 image

依然范特西╮ 提交于 2019-12-02 14:27:49

问题


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]>

回答1:


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



来源:https://stackoverflow.com/questions/16968356/vml-base64-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!