Administration Guide › Email Notifications › How to Use Email Templates › Custom Email Templates › Email Template API
Email Template API
When a message is generated from a template, Identity Manager makes the implicit objects below available to the message. These objects let you insert instance-specific information into a message by calling methods in the Email Template API.
A template can call the methods in any of the following objects:
- _contentType. Specifies the contentType for the email.
- _priority. Specifies the priority for the email.
- _to. Adds recipients to the message's To field.
- _cc. Adds recipients to the message's cc (send copy to) field.
- _bcc. Adds recipients to the message's bcc (send blind copy to) field.
- _subject. Specifies the subject of the email.
- _encoding. Specifies the encoding for the email.
- template. Lets you add a string of text to a message from lines of JavaScript code.
- _util. A utility object.
- _eventContextInformation. Contains information about the event generated by the current task, such as event name and approval status.
- _taskContextInformation. Contains a collection of information about the current task, such as task name, organization name, and constituent events.
These objects are described in the following sections.
_contentType
Specifies the contentType for the email.
If no contentType is specified through _contentType variable, the default contentType "text/html" applies.
Methods: None.
Example:
<% _contentType = "text/html"; %>
_priority
Specifies the priority for the email. Specify 0 for no priority (default) and 1 for high priority.
Methods: None.
Example:
<% _priority = "1"; %>