Email templates

Email templates (also called Email sections) are part of the Email context in a template. The Email context outputs HTML email with embedded formatting to an email client through the use of an email server. Since email clients are numerous and do not support same features, the HTML generated by this context is not optimized for any specific client - rather, it's meant to be compatible with as many clients and as many devices as possible.

In Email templates, many content elements can be used; see Content elements. However, special attention must be paid to the way elements are positioned. In Email sections, it is advisable to position elements using Tables and to put text in table cells.

Email templates are personalized just like any other template; see Variable Data.

The subject, recipients (To, CC and BCC), sender and reply-to address are specified with Email Script Wizards; see Email header settings.

An Email context can contain multiple templates. When generating output from the Email context, however, only one of the Email templates can be merged with each record. Set the 'default' Email section (see below) before generating Email output; see also Generating Email output.

Adding an Email template

When an Email template is created (see Creating an Email template with a Wizard), only one Email section is added to it. An Email context may contain various templates, but per record only one of those can be sent when you generate Email output.

It is not possible to add an Email section to an existing Email context with the help of a Template Wizard.

To provide alternative content for your email, you could use Conditional Content (see Showing content conditionally), or Snippets and a script (see Snippets and Loading a snippet via a script).

If you would like to start with a template that is identical to the one you already have, consider copying it (see Copying a section).

To add a section to the Email context:

  • On the Resources pane, expand the Contexts folder, right-click the Email folder, and then click New Email.

Deleting an Email template

To delete an Email section:

  • On the Resources pane, expand the Contexts folder, expand the Email context, right-click the name of the section, and then click Delete.

No backup files are maintained in the template. The only way to recover a deleted section, is to click Undo on the Edit menu, until the deleted section is restored. After closing and reopening the template it is no longer possible to restore the deleted context this way.
To prevent losing any work, it is recommended to configure the auto-save and auto-backup functions in the preferences (see Saving Preferences).

Styling and formatting an Email template

The contents of an Email section can be formatted directly, or styled with Cascading Style Sheets (CSS). See Styling and formatting.

Email clients do not read CSS files and some even remove a <style> tag when it is present in the email's header. Nevertheless, CSS files can be used with the Email context in the Designer. When generating output from the Email context, the Designer converts all CSS rules that apply to the content of the email to inline style tags, as if local formatting was applied.

Before you can style an element, you have to select it. In an Email context it can be difficult to select an element by clicking on it. Use the breadcrumbs at the top and the Outline pane at the left, to select an element. See Selecting an element.

In order for a style sheet to be applied to a specific section, it needs to be included in that section. There are two ways to do this.

Drag & drop a style sheet

  1. Click and hold the mouse button on the style sheet on the Resources pane.
  2. Move the mouse cursor within the Resources pane to the section to which the style sheet should be applied.
  3. Release the mouse button.

Using the Includes dialog

  1. On the Resources pane, right-click the section, then click Includes.
  2. Choose which CSS files should be applied to this section. You can also change the order in which the CSS files are read. This can have an effect on which CSS rule is applied in the end.

Setting a default Email template for output

An Email context can contain multiple templates. When generating output from the Email context, however, only one of the Email templates can be merged with each record.

To select the Email section that will be output by default:

  • On the Resources pane, expand the Email context, right-click a section and click Set as Default.
The Default section is executed when the template is merged using the Create Email Content task in Workflow (see Workflow Help: Create Email Content).

Use a Control Script to dynamically select an Email section for output depending on the value of a data field.

 
  • Last Topic Update: 24/01/2017 09:32
  • Last Published: 7/6/2017 : 9:48 AM