You can use a mail template to send emails from a workflow.
A mail template optionally has tokens that consist of two parts: a dollar sign ($) and
a token number. An example of a token is $3. The workflow system replaces each token with the
corresponding element from an array of string values that is passed with the
templateVals parameter. Mail templates are subject to the following requirements:
- The mail template is checked into an object store and referenced in the workflow with an
attachment field.
- Token numbering begins with 1 and is sequential.
- If a dollar sign in the template is not used as a token indicator, it is properly encoded
in HTML as $.
- If a dollar sign is passed as part of a templateVals parameter value, it
is either properly encoded in HTML or escaped in the following manner: “\\$”. Also, as shown
in the following example, at least one space exists between an escaped dollar sign and a
number: “\\$ 2”.
Here is an example of a template:

To send an email with a mail template:
- Click the Component step to get to the Properties pane.
- In the General tab, click New in the Operations area.
- Select sendMailTemplateAttachment.
- Specify the following expression values in the Operation Parameters section:
- from: From address for the email.
- to: To address for the email. Separate multiple addresses with commas.
- subject: Subject for the email.
- template: Template to use for the body of the email. Specify the mail template attachment
field name.
- templateVals: Replacement values for the template.
- att: The content of these VWAttachments is attached to the email.
- Click OK.