HtmlEmbeddedObjs Collection (Dundas Mailer Control 1.0)

Dundas

HtmlEmbeddedObjs Collection (Dundas Mailer Control 1.0)

Stores HtmlEmbeddedObj objects. This collection is 0-based and determines the objects which can be embedded into the html body of the email.

Remarks

This collection stores any objects to be embedded into the html body of the email. Objects which can be embedded into the html body of the message are audio files, graphics files, etc.

The HtmlEmbeddedObjs collection supports the following methods and properties:

  • Add (FileName as string, ContentID as string, [ContentName as string, CustomHeaders as string]). Adds an HtmlEmbeddedObj object to the collection.

  • Remove(Index). Removes a particular object from the collection.

  • Count (read-only property). The number of objects stored in the collection.

  • Item(Index). Used to retrieve a particular object from the collection.

  • Clear(). Removes all objects from the collection.

The Index argument can be either a zero-based numerical index or a string key. The string key is defined by the FileName argument.

To embed objects into an html email you will need to "wrap" the appropriate tags around the HtmlEmbeddedObj object when adding the objects to 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.

To embed objects into an email you will need to iterate through the Files collection of the Dundas Upload control.

When you add objects to this 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".

The QuickSend method does not utilize this collection.

Note that if the HtmlBody property is a zero-length string (the default) then the items in this collection will be ignored. Items will also be ignored if both the HtmlBody and Body properties are set and the client's email software displays text-based email by default.

Refer to Tutorial 2: Sending an Html Email with an Embedded Image for example source code on how to send an html email with embedded objects.

See Also: HtmlEmbeddedObj Object | Add Method | Remove Method | Clear Method | Item Method | Count Property