---
title: Managing e-mail templates
related:
  - https://docs.kentico.com/k81/managing-users/sending-e-mails.md
  - https://docs.kentico.com/k81/developing-websites/loading-and-displaying-data-on-websites/writing-transformations/using-transformations-in-macro-expressions.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

Kentico sends automatic system e-mails for various purposes, for example workflow notifications. The content of such e-mails is determined by templates according to the type of the given e-mail. Many Kentico features send e-mails based on predefined templates that are included in the default installation.

To edit the templates, open the **E-mail templates** application. Editing templates allows you to alter the e‑mails sent by the system to match the required design and/or language.

There are two types of e-mail templates:

- **Global** - only users with the Global administrator [privilege level](https://docs.kentico.com/k81/managing-users/user-management.md) can manage global e-mail templates. Choose the **(global)** option in the **Site** selector.
- **Site-specific** - allow you to override the global templates for specific websites. You need to select the appropriate **Site** and create a new template with a **Code name** that matches the corresponding global template.

The system only contains global templates by default.

When editing e-mail templates, the following properties are available:

| Property           | Description                                                                                                                                                                                                                                                                       |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Display name       | The name of the template displayed in the administration interface.                                                                                                                                                                                                               |
| Code name          | Serves as a unique identifier of the e-mail template (for example in the API).                                                                                                                                                                                                    |
| E-mail type        | Identifies the type of functionality to which the template is related. This can be used to categorize and filter e-mail templates.                                                                                                                                                |
| From               | E-mail address 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 (receive a copy of the e-mail, but cannot see the addresses of other recipients in the mail).                                                                                                                                           |
| Subject            | Subject of the e-mail.                                                                                                                                                                                                                                                            |
| HTML version       | Defines the content that is used for the template when sending e-mails in HTML format. Supports all standard HTML tags and syntax (tables etc.).<br>You can select the preferred format using the **Settings -> System -> E**\*\*‑****mails -> E****‑\*\***mail format** setting. |
| Plain text version | Plain text version of the e-mail template.                                                                                                                                                                                                                                        |

Example of the HTML version of a template:

```html

<html>
  <head>
  </head>
  <body style="font-size: 12px; font-family: arial">
    <p>
      This is an automatic notification sent by Kentico. The following page is waiting for your approval. Please sign in to the Kentico administration interface and approve it.
    </p>
    <p>
      <strong>Page:</strong> <a href="{%DocumentEditUrl%}">{%documentname%}</a> {% ifEmpty(DocumentPreviewUrl, "", "(<a href=\"" + DocumentPreviewUrl + "\">preview</a>)")|(encode)false %}
      <br />
      <strong>Last approved by:</strong> {%approvedby%}
      <br />
      <strong>Last approved when:</strong> {%approvedwhen%}
      <br />
      <strong>Original step:</strong> {%originalstepname%}
      <br />
      <strong>Current step:</strong> {%currentstepname%}
      <br />
      <strong>Comment:</strong>
      <br />
      {%comment%}
    </p>
  </body>
</html>

```

Most templates contain [macro expressions](https://docs.kentico.com/k81/macro-expressions.md) (such as {% currentstepname %}), which the system resolves dynamically when sending the e-mails. The use of macros is necessary to ensure that individual e-mails contain information relevant to the situation that caused the e-mail to be sent. You can add macros into fields by clicking **Insert macro** () or write the required expressions manually.

If you wish to display data loaded via a macro in a specific format, you can apply [transformations](https://docs.kentico.com/k81/developing-websites/loading-and-displaying-data-on-websites/writing-transformations.md). See [Using transformations in macro expressions](https://docs.kentico.com/k81/developing-websites/loading-and-displaying-data-on-websites/writing-transformations/using-transformations-in-macro-expressions.md) for more information.

> **Tip:** You can attach files to an e-mail template through the **Attachments** button in the header of the template editing page. The attachments are included when the system sends out e-mails based on the given template. Clicking the button opens a dialog where you can manage the attachments.
