How to insert image into Outlook HTML email?

We have a Winforms application that supports dragging and dropping pieces of HTML into Outlook email messages (HTML).

Lines of text are in order.

But how do we continue to work with images? Suppose we don’t want to post images on the Internet, but instead we want to send them via e-mail. Suppose also that we want to see an inline image, and not as an attachment (where, of course, the recipient's email client supports it).

If you look at the source of the Outlook HTML message, there are β€œcid” tags for the images (which point to the image as the attachment I suppose), but how are we going to generate cid / contentid?

+8
outlook html-email winforms
source share
3 answers

If the manual step in this process is an option, you can do it as follows:

  • create HTML automatically or manually as a saved HTML file with <img> tags that link to files with saved local files
  • attach HTML to your Outlook email using the Insert as Text option, which will be hidden under the down arrow on the Insert button when you select the HTML file as an attachment.

This fills the HTML letter with HTML code from the file and inserts all the images. I believe this tool uses Base64 encoding to embed images, as described in Sam's email.

Depending on the workflow, this method may be easier than converting the images to Base64 yourself.

Note that this method only works in Outlook for Windows, not in Outlook for Mac .

+5
source share

You can embed images in your html email address using base64 encoder. This is quite complicated, but you basically encode the image as a text string in a letter, which is then interpreted.

However, this does not work in all email clients.

Take a look at this and see what it is looking for:

http://www.campaignmonitor.com/blog/post/1761/embedding-images-in-email/

EDIT

Updated campaign monitor record on clients that work with base64 images .

+5
source share

If you use html to create all the email, you can search Google for the same image and put it there:

<img src="http://www.google.com/intl/en_ALL/images/logos/images_logo_lg.gif" alt="picture1" />

You can also use photobucket to post images (if you need to). Basically, you have an image source.

0
source share

All Articles