|
||
Kentico CMS sends automatic system e-mails for various purposes, such as for example workflow notification. The content of these e-mails is determined by templates according to the type of a given e-mail. Many modules and features of Kentico CMS send e-mails based on predefined templates that are included in the default installation.
There are two types of e-mail templates: global and site-specific. If a site-specific template of a certain type is not defined, the respective global template is used by the site instead. All e‑mail templates can be modified at Site Manager -> Administration -> E‑mail templates and the templates of a given site may also be accessed in CMS Desk -> Administration -> E‑mail templates. Editing templates allows you to alter the e‑mails sent by the system to match the required design and/or language.
An e-mail template has the following properties:
Display name |
The name of the template displayed in the user interface. |
Code name |
The name of the template used in code. |
From |
E-mail address that will be used as the sender (From) address of the e-mail. |
Cc |
E-mail addresses of copy recipients. |
Bcc |
E-mail addresses of blind copy recipients. These will get a copy of the e-mail, but won't see the addresses of other recipients in the mail. |
Subject |
Subject of the e-mail. |
HTML version |
HTML code of the e-mail template. |
Plain text version |
Plain text of the e-mail template. |
Example of the HTML version of a template:
<html> <head> </head> <body style="FONT-SIZE: 12px; FONT-FAMILY: arial"> <p> This an automatic notification sent by Kentico CMS. The following document is waiting for your approval. Please sign in to Kentico CMS Desk and approve it. </p> <p> <b>Document:</b> <a href="{%applicationurl%}/cmsdesk/default.aspx?expandidpath={%idpath%}&expandmode=publish"> {%documentname%}</a> <br> <b>Last approved by:</b> {%approvedby%} <br> <b>Last approved when:</b> {%approvedwhen%} <br> <b>Original step:</b> {%originalstep%} <br> <b>Current step:</b> {%currentstep%} <br> <b>Comment:</b> <br> {%comment%} </p> </body> </html> |
Please note that e-mail template properties may contain macro expressions, such as those marked in the code above, that are resolved (merged) when the e‑mail is sent. The use of macros is necessary to ensure that individual e-mails contain information relevant to the situation that caused them to be sent. In some cases, you may wish to display the data loaded via a macro in a specific format. This can be done by applying transformations as described in the Transformations in macro expressions topic.