Editing an Existing Email Template

Workflow Manager 2019

On the Email Template Details page, you can edit both email templates that were shipped with Workflow Manager and also new email templates that you have created.

Note • In previous releases, email templates were stored on the Workflow Manager server in the Workflow Manager\wwwroot\EmailTemplate directory. Starting with Workflow Manager 2013 R2, the email template text files are stored in the Workflow Manager database. Any edits that you would like to make to the email templates must be made in the Workflow Manager interface on the Email Template Details page. The Workflow Manager server location, however, does include a backup copy of the default email template text files for your reference.

You can edit the content of email templates on the Email Template Details page. While you are able to perform inline formatting on the Email Template Details page, it is recommended that you instead modify the email template’s associated CSS file, as described in Formatting and Previewing Email Templates.

Editing the Content of Email Templates
Formatting and Previewing Email Templates

Editing the Content of Email Templates

To edit the content of an existing email template, perform the following steps:

To edit an email template:

1. In the navigation bar, click Email Templates in the Settings menu. The Email Template Administration page opens, and lists all existing email templates.
2. Click the name of the email template that you want to edit. The Email Template Details page opens, displaying the selected email template in a text editor.

The text editor on the Email Template Details page provides the following views of the selected email template:

Design—Displays an editable view of the text, tables, and images of the email template.
HTML—Displays an editable view of the HTML code of the email template.
Preview—Displays a non-editable preview of how an email created using this template will look when it is opened by the recipient. By default, a link to an external CSS file controls the styling of these email templates. To accurately view a preview of the email template, you first need to enter your local server address in the CSS link, as described in Formatting and Previewing Email Templates.

You switch between these three views by clicking on the tabs at the bottom of the window:

3. The Template Name field lists the name of the text file that identifies this email template.

Important • When editing one of the default email templates (which were installed with Workflow Manager), it is recommended that you do not edit this field. If you do edit it, you will also need to update its associated entry in the web.config file, as described in Email Template Settings.

4. The Subject field lists the contents of the email’s Subject line. When editing this field, make sure that the final text describes the purpose of this email and prompts email recipients to take action.
5. Use the controls on the Design tab to modify the format of the text. However, it is recommended that you instead edit the external CSS file, as described in Formatting and Previewing Email Templates.
6. Use the Notification Variable list to insert replaceable parameters, if desired, as described in Using Notification Variables in Email Templates.
7. In the Remarks field, enter notes or comments to identify the purpose of this email template, if desired.
8. Click Update to save your edits.

Formatting and Previewing Email Templates

Rather than using the controls on the Design tab of the Email Template Details page, it is recommended that you use CSS styles to format your email templates. That helps you use consistent formatting on all of your email templates.

By default, a link to an external CSS file controls the styling of these email templates. However, to accurately view a preview of the email template as it will appear to the email recipient in both the Design and Preview tabs of this editor, you first need to enter your local server address in the CSS link.

To connect an email template to the email.css file:

1. Open an email template on the Email Template Details page. You will see that on the Design tab (and the Preview tab) the browser default styles are being used to display the content of the template.

2. Open the HTML tab of the editor.
3. Locate the following line:

<link href="[AMSWebServer]/Content//email.css" rel="stylesheet" type="text/css" />

4. Replace [AMSWebServer] in that link with the name of your local server, such as:

<link href="http://localhost:81/Content//email.css" rel="stylesheet" type="text/css" />

5. Click Save. When you return to the Design or Preview tabs, the styles defined in the email.css file will be applied.