|
Email templatesEmail 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 templateWhen 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:
Deleting an Email templateTo delete an Email section:
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. Styling and formatting an Email templateThe 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
Using the Includes dialog
Setting a default Email template for outputAn 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:
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. |
|