HtmlBody (Dundas Mailer Control 1.0)

Dundas

HtmlBody (Dundas Mailer Control 1.0)

Overview | Properties | Methods

The html body of the message.

Syntax

MailerObject.HtmlBody = [string]

The HtmlBody property syntax has the following parts:

Part

Description

string

A string expression containing html code which constitutes the body of the email.

Remarks

Use this property to send the body of the email in an html format.

Using html for the body of your email allows you to embed html objects into your message body via the HtmlEmbeddedObjs collection.

It is also possible to set the email body by using the LoadBodyFromFile method. Just make sure that the appropriate html tags are included in the ASCII file.

The HtmlBody property MUST CONTAIN all standard html headers that any html page would contain (e.g. <html><head></head><body></body></html>). It is the responsiblity of the developer to supply these tags when setting the HtmlBody property.

The QuickSend method can only send text-based email. You must use SendMail in order to send an email with an html body.

If you set both the Body property and the HtmlBody property before sending the message then the type of body displayed is dependent on the default settings of the client's email software. If the client defaults to html email then the body displayed will be determined by the HtmlBody property. However, if the client's email program defaults to text-based email then the Body property determines the body of the message.

Note that you will need to replace any carriage return/linefeed characters with <br> or <p> tags from text gathered with textboxes if you want to display the email body on more than one line.

The PostArticle method can also use html but we strongly discourage this practice. Many servers WILL NOT accept articles in an html format.

The maximum allowable size of the email body is 32Kb.

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

See Also: Body | Dundas Upload Control | HtmlEmbeddedObjs Collection