Represents an item to embed in an e-mail message constructed using the System.Web.UI.WebControls.MailDefinition class.
See Also: EmbeddedMailObject Members
The System.Web.UI.WebControls.EmbeddedMailObject represents an item to embed in a mail message. These embedded items can be image files such as company logos. Each embedded item is specified by an identifier and a path.
To ensure that an embedded object is displayed correctly within the e-mail message file, the following conditions must be met:
The mail message is in HTML format.
The item is an image file (.jpg, .gif, .bmp, and so on).
The HTML-formatted body file specified in the MailDefinition.BodyFileName property contains a reference to the image file using the following syntax:
If an System.Web.UI.WebControls.EmbeddedMailObject is added to a mail message and does not fulfill all of the requirements specified previously, it will most likely be displayed as an attachment in the mail message. If an item is referenced by an identifier in the mail message but not included as an embedded item, it will appear as a broken attachment when the mail is viewed.
The System.Web.UI.WebControls.EmbeddedMailObjectsCollection stores a collection of System.Web.UI.WebControls.EmbeddedMailObject objects for a single mail message. The System.Web.UI.WebControls.EmbeddedMailObjectsCollection is used by the MailDefinition.EmbeddedObjects property of the System.Web.UI.WebControls.MailDefinition object to create the mail message.
Mail messages that allow embedded objects are configurable in the following Web controls by setting their System.Web.UI.WebControls.MailDefinition properties declaratively:
The values in the System.Web.UI.WebControls.EmbeddedMailObject and System.Web.UI.WebControls.EmbeddedMailObjectsCollection objects are not stored in view state. This protects against malicious users discovering path information for your server.