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

后端 未结 3 664
梦如初夏
梦如初夏 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: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 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.

提交回复
热议问题