Table of Contents
E-Mail Templates
Introduction
Several Attention products send e-mail: AWP notifies about new user accounts and orders, the Scheduler reports finished or failed jobs, the Workflow Engine notifies assignees. None of them carries its own e-mail text. Each such e-mail has a class which the sending product contributes, and the text that is actually sent is a template for that class, created and edited in this plugin. The e-mail itself is sent by the Fylr server, so its outgoing mail server has to be configured in Fylr's base configuration.
The panel has two tabs: Templates holds the e-mails, Layouts the surrounding header and footer a template can be wrapped in.
Templates
The table lists every template with its class and name. Which template a product uses is chosen in that product's own configuration - for example the account e-mails in the AWP user accounts settings, or the notification e-mail of a workflow transition. A class can have any number of templates, so the same kind of e-mail can be sent in different variants.
Add… asks for the e-mail class and a name. The name is prefilled with the class name and must be unique. The new template is filled with the default subject and text the class ships with, so it is usable right away and only has to be adapted.
Properties… opens the editor for the selected template:
- Use Layout wraps the text of the template in the header and footer of the chosen layout. Without it the text is sent as it is.
- Language selects which translation of subject and text is being edited. The list offers the data languages of the Fylr instance; a language that already has content is shown in bold. When an e-mail is sent in a language that has no text, the English text is used, and if that is empty as well, the first language that has any.
- Subject and the text below it are the e-mail. The text may be plain text or HTML - it is sent as HTML when it starts with
<html, after the layout header has been put in front of it. - The Placeholders list on the right shows every
${…}token the class replaces when the e-mail is sent. Drag a placeholder into the subject or the text to insert it.
Test… sends the selected template to an e-mail address - the address of the ACC user is proposed - in the session language. The placeholders of the class are not resolved in a test e-mail, they are replaced by their quoted names so the position of each can be checked; the global placeholders below are resolved.
Remove… deletes the selected templates. A product configuration still referring to a removed template cannot send that e-mail any more until another template is selected there.
Global placeholders
Next to the placeholders of its class every template can use these:
| Placeholder | Content |
|---|---|
${date} | The date the e-mail is sent, formatted in the language of the e-mail. |
${time} | The time the e-mail is sent, formatted in the language of the e-mail. |
${user} | The display name of the user in whose session the e-mail is sent. |
${fylr-url} | The external URL of the Fylr instance, for example https://fylr.customer.com/. |
${fylr-domain} | The external URL without protocol and trailing slash, for example fylr.customer.com. |
${fylr-uuid} | The UUID of the Fylr instance. |
Layouts
A layout is a header and a footer that are put around the text of every template using it, so the corporate design is kept in one place instead of in every template. When the plugin is opened for the first time a Default Layout with an HTML header and footer is created; adapt it or duplicate it for further layouts. A layout is selected with the Layout chooser, the buttons next to it duplicate, rename and delete it. The last layout cannot be deleted.
Header and Footer are edited per Language the same way as a template. For an HTML e-mail the header has to start with <html and carry everything up to the point where the text of the template is inserted, the footer closes it. A language without content falls back like a template does.
Attachments holds the images (PNG or JPG) the header and footer embed. Add… uploads a file, the ID column shows the name it is embedded by. Drag an attachment from the table into the header or the footer to insert an <img src=“cid:…”/> tag referring to it; only images actually referred to by such a tag are attached to the outgoing e-mail.
