How to embed an image into an Outlook HTML email message?

后端 未结 3 643
梦如初夏
梦如初夏 2020-12-16 20:32

We have a Winforms application which supports dragging and dropping chunks of HTML into Outlook (HTML) mail messages.

Chunks of text are fine.

But how do we

相关标签:
3条回答
  • 2020-12-16 21:24

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

    This does not work in all email clients though.

    Take a look at this and see if its what your looking for:

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

    EDIT

    The updated campaign monitor post on the clients which work with base64 images.

    0 讨论(0)
  • 2020-12-16 21:25

    If you are using html to make your whole email, you can search google for the same image, and put this in there:

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

    You can also, use photobucket to host images (if you have to). Basically, you HAVE to have a source for the image.

    0 讨论(0)
  • 2020-12-16 21:33

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

    1. create the HTML automatically or manually as a saved HTML file, with <img> tags that link to locally-saved image files
    2. attach the HTML to an Outlook email using the 'Insert as text' option tucked away under the down-arrow on the "Insert" button when selecting the HTML file as an attachment.

    This populates the HTML email with the HTML from the file and embeds all images. I believe this tool uses Base64 encoding to embed the images as described in Sam's email.

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

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

    0 讨论(0)
提交回复
热议问题