HTML inline images (Content-ID MIME header support)

Inline images can be used in the HTML body of the e-mail. This consists of two parts: one is a tag in the HTML pointing to the image to be shown. The other part is part of the header: the content ID.

HTML tag

In the body use the following tag:

<img src = "cid:image@hostname" >

Replace image with the actual image name and hostname with the actual host name. Note that other than that the image@hostname location is the same as used in Attachment parameter of the Mail command the name of this location is not critical. All that is required is that it is unique for an object. (Strictly speaking it should be globally unique but since this is not enforced and not enforceable the lesser requirement of uniqueness for an object within a host is enough.)

Content-ID in MAIL command

The cid placed in the HTML body must also be passed to the MAIL command; this is done as part of the Attachments parameter:

Attachments("c:\mail\body.txt,c:\mail\body.html,[image@hostname]path\image.gif")