An email message for the email account status notification handler contains the following structure:

  • A required header section describing the sender, recipients, subject, and other header elements

    This section must appear exactly once, and it must be the first section of the template file.

  • An optional section providing a plain-text version of the message body

    This section may appear at most once, and at least one of the plain-text and HTML-formatted body sections must be present.

  • An optional section providing an HTML-formatted version of the message body

    This section may appear at most once, and at least one of the plain-text and HTML-formatted body sections must be present.

  • An optional section providing information about an attachment to include in the message

    This section can be included zero, one, or multiple times, and all attachment sections must appear after all other sections.

Header section

A message template file must start with a header section that specifies the recipient and sender addresses, the message subject, and the values of any custom headers that should appear in the message. It also indicates whether the template should be enabled and used to send email messages.

The header section must begin with the line ----- BEGIN HEADERS ----- and can contain a number of name-value pairs that provide information about the message. Each name-value pair should appear on a separate line, and the name and value must be separated by a colon and optional spaces. The header section can include the following:

ENABLED

Specifies whether this template is enabled and should be used to generate an email message.

This element must be present and must have a value of either true or false. This is primarily intended for cases in which a message should only be generated under certain circumstances.

Tip:

If you don't want a message sent for a particular notification type, don't specify a template file for that notification type in the configuration for the multi-part email account status notification handler.

TO

Specifies a primary recipient for the email message. This recipient is visible to all recipients.

The value can be either an email address, such as jdoe@example.com, or a name followed by the email address in angle brackets, such as John Doe <jdoe@example.com>.

To specify multiple TO recipients, specify this element multiple times.

It can be omitted if the message should have only CC or BCC recipients, but the message must have at least one TO, CC, or BCC recipient.

CC

Specifies a carbon-copied recipient for the email message. This recipient isvisible to all recipients.

The value can be either an email address, such as jdoe@example.com, or a name followed by the email address in angle brackets, such as John Doe <jdoe@example.com>.

To specify multiple CC recipients, specify this element multiple times.

It can be omitted if the message should have only TO or BCC recipients, but the message must have at least one TO, CC, or BCC recipient.

BCC

Specifies a blind carbon-copied recipient for the email message. This recipient is not visible to other recipients.

The value can be either an email address, such as jdoe@example.com, or a name followed by the email address in angle brackets, such as John Doe <jdoe@example.com>.

To specify multiple BCC recipients, specify this element multiple times.

It can be omitted if the message should have only TO or CC recipients, but the message must have at least one TO, CC, or BCC recipient.

FROM

Specifies the address from which the email message should appear to be sent.

This value can be either an email address, such asjdoe@example.com, or a name followed by the email address in angle brackets, such as John Doe <jdoe@example.com>.

This element must be specified exactly once.

REPLY-TO

Specifies the default address to which users should send replies.

The value can be either an email address, such as jdoe@example.com, or a name followed by the email address in angle brackets, such as John Doe <jdoe@example.com>.

This element is optional and can only be specified once.

SUBJECT

Specifies the subject for the email message.

This element must be specified exactly once.

HEADER

Defines a custom header for the email message.

The header value itself should be a name-value pair with the name and value separated by a colon and optional spaces, such as X-Custom-Header-Name:Custom Header Value.

This is an optional element and can be specified multiple times to specify multiple headers with the same or different names.

Body sections

The header section must be followed by plain-text body sections, HTML-formatted body sections, or both. Each of these sections consists of free-form text that can span multiple lines and continues until the beginning of the next section or the end of the template file is reached.

If a plain-text body is included, it must begin with the line ----- BEGIN PLAIN-TEXT BODY -----. If an HTML-formatted body is included, it must begin with the line ----- BEGIN HTML BODY -----. At least one of these sections must be included. If an HTML-formatted body section is included, you should add a plain-text body for the benefit of clients that prefer plain text or cannot handle HTML content. Any blank lines at the beginning or end of the body text are removed, but blank lines in the middle of the body are preserved.

Attachment sections

The template can contain any number of optional attachment sections that describe any attachments that should be included in the message. Specify each attachment in its own section at the end of the template, after the header, plain-text, and HTML-formatted body sections. Each attachment section must begin with the line ----- BEGIN ATTACHMENT ----- and can include the following elements, using the same colon-delimited syntax used in the header section:

FILENAME

The name (without any path information) of the file to be attached. This must be specified, and the file must exist in the same directory as the template file.

CONTENT-TYPE

The MIME type for the attachment. This is an optional element. If it is not specified, a default content-type of application/octet-stream is used.

INLINE

If present, this value must be either true or false. If it is omitted, a default value of false is assumed.

If true, indicates that the attachment should be an inline attachment. For example, if you include an image that should be referenced within the HTML body, the image source path should be cid: followed by the filename, such as cid:company-logo.png.