HtmlEmbeddedObj Object (Dundas Mailer Control 1.0)

Dundas

HtmlEmbeddedObj Object (Dundas Mailer Control 1.0)

This object is stored in the HtmlEmbeddedObjs collection.

Remarks

To add HtmlEmbeddedObj objects to the HtmlEmbeddedObjs collection use the collection's Add method. To remove a single object call the Remove method of the collection. To clear all objects from the collection use the Clear method.

The HtmlEmbeddedObj object consists of the following four (4) properties:

  • FileName as string. The name of the file to be embedded.

  • ContentID as string. A unique ID which is used to identify each embedded object.

  • ContentName as string. Optional. The new name of the file attachment. If you do not use this argument then the FileName argument is used instead.

  • CustomHeaders as string.

Add HtmlEmbeddedObj objects to the HtmlEmbeddedObjs collection to embed audio files, graphics files etc. to the html body of the email message.

To embed objects into an html email you will need to "wrap" the appropriate tags around the HtmlEmbeddedObj objects being embedded into the HtmlBody property. Audio elements can be inserted as the BGSOUND attribute of the BODY tag, while graphics files are commonly inserted using <IMG> tags. Refer to Tutorial 2: Sending an Html Email with an Embedded Image for example source code of this.

When you add HtmlEmbeddedObj objects to the HtmlEmbeddedObjs collection MAKE SURE that the values you supply for the ContentID argument are unique. This ContentID is referenced within html tags with "cid:theuniquenumber" . It is also important to use lower-case when specifying "cid". Microsoft's Outlook will not embed objects if you use "CID".

If the client email software supports html email it might not support embedded html objects. In this case the ContentName argument will be displayed in the email body instead of the embedded object's content. 

NOTE: The QuickSend method can not send an html-based email.

See Also: HtmlEmbeddedObjs Collection | Add Method | Remove Method | Item Method | Count Property | Tutorial 2: Sending an Html Email with an Embedded Image