With mail templates you can manage your email texts for reusability with different notification rules. Edit it once and the changes will take effect on all rules which are using the template. Mail templates additionally allow you to create HTML emails.
Create a new mail template¶
Click the link “Create new mail template” on the mail templates index page and the page for editing mail templates will open.
Choose a name for your new mail template and insert it in the text field “Name”. This will work as an internal identifier for selecting this mail template in the rules form. If you do not change the setting for “Mail type” it will be a plain text email. Enter your notification text in the textbox “Mail body”. All placeholders are supported. To see a list of all available placeholders, click the link “List of placeholders” in the right sidebar (or open the manual page Placeholders). For plain text mail templates you do not need to insert an alternative body.
If you want to create a new HTML mail template, click the radio button “HTML” for “Mail type”. The text box for mail body will automatically change to WYSIWIG style editor. By default the editor will load in the source code view where you can insert or copy/paste your HTML code.
To switch to the WYSIWIG view, click the “Source” button in the editor’s toolsbar.
If you want to send notification mail in HTML format, remember to add an alternative body text. This text will be displayed in email clients which are not capable of loading HTML mails.
When your template is done, click the button “Add template”. You will be forwarded to the mail templates overview page and your newly created template will show up in the list.
If you are looking for professionally designed HTML mail layouts, you will surely find the right one for you on Envato’s themeforest.
Managing your mail templates¶
In the mail templates overview page you can hover a mail template entry to see the links for managing a template. “Edit” will bring you back to the editor page where you can adjust your mail texts. If you want to create a new template based on the layout of an already existing template, you can copy the original template and then edit the duplicate. For template exchange or backup, “Export” is the perfect choice. Either click the “Export” link in a row to export only the hovered template or use the checkboxes to select multiple templates and then select “Export” from the “Bulk Actions”.
Using your mail templates¶
After you have created a mail template, it will show up in the notification rule form’s “Mail template” drop down. If you choose your mail template, the default text box will disappear, because the text of the mail tempalte will be used.