image - Outlook HTML Mail - changing linked items to embedded -


Formatted HTML using

I Outlook.MailItem

  Outlook.MailItem objMail = (Outlook.MailItem) olkApp.CreateItem (Outlook.OlItemType.olMailItem); ObjMail.To = to; ObjMail.Subject = Subject; ObjMail.HTMLBody = html body;  

An email is generated to protect from an RTF control, which is to HTML & lt; & Lt; Filename & gt; & Gt; / Code> _file subdirectory example:

& lt; Img border = "0" src = "file: /// c: / document% 20 and% 20 settings / its m / local% 20 settings / temporary / 2 / zbt4dmvs_images / zbt4dmvs_1 .png" width = "94" height = "94" alt = "[image]" & gt;

By sending e-mail mail is generated with broken links like this

Outlook 2007 as e-mail client in the form of e-mail client Using an e-mail editor, switching to RTF (Options tab, Format tab group) inlays and images.

Programmatically doing this:

  var oldFormat = objMail.BodyFormat; ObjMail.BodyFormat = Outlook.OlBodyFormat.olFormatRichText; ObjMail.BodyFormat = Old format;  

Loses images and scavenging images (the image has a [image] link marker on the screen, which is clickable but No longer shows image). It is not surprising that " all text formatting will be lost when the bodyform property is converted from RTF to HTML and vice versa " for documentation.

Unfortunately there is an easy way to change a type in each attachment to MailItem.Attachements It does not seem to be OlAttachmentType.olByValue , because it is a readable property that is set when you create attachment .

An approach that comes to mind HTML, with markers & lt; Img & gt; Instead of the tag and running the program a mailtime text, a Outlook. Enter attachment type OlAttachmentType.olByValue .

Another option is src = "cid: uniqueIdN" .

So, Stoney ... is a way of converting linked images into embedded images, ideally without third party tools such as redemption? Changes in the RTF get results, but doing so does not require any pre-requisite, and obviously loyalty can be lost - I just want to do just that: D. From my current thoughts I have Not clear.

Since you are using .NET> 2.0, you can use the System.Net.Mail namespace Want to see the creation of mail messages I have found that it is very customizable and it is very easy to use for a job as much as you used to have the only problems that I was using right, and I used the HTML tables for layouts (CSS will not work right)

  • (Plain Text and HTML)
  • If it is not, then there are some links to show you how it works ...

  • One option, I recommend going to Content ID route and embedding images as attachments I do Your second option is to host images in public on the website, and convert images to html in public images.

    You should know that HTML emails can easily be like spam and it can be considered as email server and client even for those who use only in-house use (This happened to me) may end in Outlook's junk mail folder.


  • Comments