CopiaFacts supports some of the features of proposed MHTML standard (RFC 2557) to allow attachments such as GIF files to be embedded in an HTML document. To use this feature,

You must either use the $email_options keyword MHTML (which will treat all attachments as embedded images) or add the keyword EMBEDDED: ahead of the attachment content type (for example "EMBEDDED:image/gif"). This is needed when the e-mail also has other attachments which are not embedded images. The special keyword is removed before the mail is transmitted.

If you have plain text and an HTML body, the plain text must be referenced in $email_body (or $email_text) and the HTML must be the alternate body in $email_altbody (or $email_alttext), not the other way round.

There must be one or more attachments named on $email_attach commands, which you can reference in your  HTML text with context IDs Image1, Image2 etc., in conjunction with the globally unique message ID. The message will fail with error 153 if you do not specify any attachments when option MHTML is specified.

If you have regular attachments as well as attachments which are to be embedded, the $email_attach commands for the embedded items should precede those for the regular attachments, to simplify the attachment number and image number matching.

In your HTML code, you must specify the embedded image context ID using the special control variable EM_MSGID, which expands to the message ID of the current message.  For example:

     ... <img src="cid:image1.`EM_MSGID" width='180' height='230'> ...

It is important to note that some popular mail readers do not fully support MHTML and your message may appear without images, and that some mail clients do not support all image types.

For more information about the capabilities of various mail readers, and advice on the correct syntax for HTML references  to embedded images, visit http://dsv.su.se/jpalme/ietf/mhtml.html.

Examples are provided in FaxFacts\Samples\MHTML, and described in the Examples section.