如何:将图像放在MailItem正文中 [英] How to: Place image within MailItem body
问题描述
大家好,
我正在使用Web服务来检索图像/徽标.此图像在邮件项目中使用.邮件项目是从Outlook中的VSTO加载项生成的.问题是如何将图像嵌入邮件项目正文中.
我不想将图像保存到客户端PC.当前,我正在执行以下操作(在邮件项目正文中设置自己的HTML),但是如果图像发生更改,则必须将所有客户端工作站都更改为,这将非常麻烦.
Hi all,
I am making use of a web service to retrieve an image / logo. This image is used within a mail message item. The mail message item is generated from a VSTO add-in within Outlook. The problem is how can I embed the image within the mail item body.
I do not want to save the image to the client PC. Currently I am doing the following (setting my own HTML within the mail item body), but if the image changes, all the client work stations will have to change to, and this will be very cumbersome.
img tag ... src="" + Path.GetDirectoryName(System.Reflection.Assembly.GetAssembly
(typeof(Class1)).CodeBase).Substring(6)
+ @"\image.jpg" alt="image.jpg"
提前非常感谢.
亲切的问候,
Many thanks in advance.
Kind regards,
推荐答案
在这里看看,嵌入HTML电子邮件图像 [^ ]
您需要将图像添加为LinkedResource
,然后只需在< img>标签.
http://www.systemnetmail.com/faq/4.4.aspx [
You need to add the image as aLinkedResource
, then just reference it in an <img> tag.
http://www.systemnetmail.com/faq/4.4.aspx[^]
Nick
这篇关于如何:将图像放在MailItem正文中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!