logo

New Response

« Return to the blog entry

You are replying to:

    • avatar
    • Mark
    • Posted on Thu 22 Oct 2009 05:13 AM

    Yes. For inline images you'll have to change a few things:

    - Set the content-disposition to inline. Change:

    Set Me.mh = Me.mc.CreateHeader("Content-Disposition")

    Call Me.mh.SetHeaderVal( |attachment; filename="your_image.png"| )

    to:

    Set Me.mh = Me.mc.CreateHeader("Content-Disposition")

    Call Me.mh.SetHeaderVal( |inline; filename="your_image.png"| )

    - Add a Content-ID header for every inline image:

    Set Me.mh = Me.mc.CreateHeader("Content-ID")

    Call Me.mh.SetHeaderVal( |<your_image.png>| )

    - Add a reference to the image in the HTML code:

    <img src="cid:your_image.png">

    I've noticed that (at least in Outlook) if you don't add the reference in the HTML the image is show as an attachment. If the reference is present the image is hidden from the list of attachments.

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: