---
title: Preparing newsletter templates
related:
  - https://docs.kentico.com/k81/on-line-marketing-features/e-mail-marketing/working-with-newsletters/writing-static-newsletter-issues.md
  - https://docs.kentico.com/k81/on-line-marketing-features/e-mail-marketing/working-with-newsletters/enabling-double-opt-in-for-newsletters.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).

The content of the e-mails sent by [newsletters](https://docs.kentico.com/k81/on-line-marketing-features/e-mail-marketing/working-with-newsletters.md) is based on templates (with the exception of dynamic newsletter issues).

You can manage the templates on the **Templates** tab of the **Newsletters** application.

![Managing newsletter templates](https://docs.kentico.com/docsassets/k81/preparing-newsletter-templates/newsletter_templates.png "Managing newsletter templates")

There are four types of templates:

- **Newsletter issue** - define the layout and design of [static newsletter issues](https://docs.kentico.com/k81/on-line-marketing-features/e-mail-marketing/working-with-newsletters/writing-static-newsletter-issues.md). Templates of this type typically contain editable regions where newsletter authors can enter the content of individual issues.
- **Double opt-in** - template for the e-mail messages where users can confirm their subscription to newsletters that have [double opt-in](https://docs.kentico.com/k81/on-line-marketing-features/e-mail-marketing/working-with-newsletters/enabling-double-opt-in-for-newsletters.md) enabled.
- **Subscription confirmation** - templates for the confirmation e-mail message sent when users subscribe to newsletters.
- **Unsubscription confirmation** - templates for the e-mail message sent when users unsubscribe.

## Creating newsletter templates

To add new templates for newsletters:

1. Open the **Newsletters** application on the **Templates** tab.

2. Click **New template**.

3. Type a **Display name** for the template.

4. Select the **Template type**.

5. Click **Save**. The system creates the template and opens its **General** tab.

6. (Optional) Set the following properties:

   | Property  | Description                                                                                                                                                                                     |
   | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   | Thumbnail | Only available for _Newsletter issue_ templates.<br>Allows you to upload an image that will be displayed as a representation of the template when creating new newsletter issues.               |
   | Subject   | Sets the subject of the e-mails based on this template.<br>This field is not available for _Newsletter issue_ templates, since authors enter the e-mail subject when writing individual issues. |

7. Write the opening and closing HTML code of the e-mail message in the **Header (HTML)** and **Footer (HTML)** fields (including the __ element).

   - You can leave the default values unless you need to customize the HTML envelope of the e-mail messages based on the template.

8. Define the main layout and content of the template inside the **Body** editor.

   - You can type basic text or add advanced content using the editor toolbar.

   ![Inserting an editable region into a newsletter](https://docs.kentico.com/docsassets/k81/preparing-newsletter-templates/inserting_editable_regions.png "Inserting an editable region into a newsletter")

   > **Info:** **Adding regions to issue templates**
   >
   > _Newsletter issue_ templates need to contain editable regions, where the authors of individual newsletter issues can enter content.
   >
   > To insert a region:
   >
   > 1. Type a region name into the Insert editable region box below the main editor.
   > 2. (Optional) Set the **Width** and **Height** of the region.
   > 3. Click **Insert**.The body editor adds the region to the current cursor position as an expression in format:
   >
   > ```text
   >
   > $$regionName:width:height$$
   > ```

   > **Info:** **Adding newsletter fields**
   >
   > You can insert the following newsletter fields anywhere inside the body of the template:
   >
   > - **{%ActivationLink%}** - only available for _Double opt-in_ templates. Resolves into a link to the subscription approval page, as defined by the _Approval page URL_ property of the given newsletter.
   > - **{%Email%}** - resolves into the e-mail address of the e-mail recipient.
   > - **{%FirstName%}** - resolves into the first name of the recipient.
   > - **{%LastName%}** - resolves into the last name of the recipient.
   > - **{%UnsubscribeLink%}** - resolves into a link to the unsubscription page, as defined by the _Unsubscription page URL_ property of the given newsletter.To add these expressions into the body, click **Insert macro** () on the editor toolbar and select the appropriate option under the **Context specific objects** section.
   >
   > **Note**: The newsletter field expressions only work in e-mails sent to actual subscribers. The macros do _not_ resolve correctly when sending draft e-mails for newsletter issues, since the recipients are not linked to subscribers in the system.
   >
   > You can also enter any other types of [macro expressions](https://docs.kentico.com/k81/macro-expressions.md) into newsletter templates.

9. (Optional) Use the **CSS stylesheet** field to define any CSS classes that you want to apply to the e-mails based on this template.

10. (Optional) Click **Attachments** to attach files to the newsletter template.

    - The attachments are included when the system sends out e-mails based on the given template.
    - In the case of newsletter issue templates, the authors of specific issues can add attachments as well.
    - For example, if you wish to display a logo image somewhere in the template layout and have it stored directly in the e-mails, you can upload the image as an attachment and then insert it into the body content.

11. Click **Save**.

You can now use the template in your newsletters.

## Assigning issue templates to newsletters

In addition to the main template configured for static newsletters, you can also add any number of alternative templates.

When editing a _Newsletter issue_ type template, you can assign it to individual newsletters on the **Newsletters** tab. Alternatively, newsletter-template bindings can be configured from the opposite side of the relationship by editing a static newsletter on its **Templates** tab.

Once a newsletter has multiple templates allowed, authors of issues can choose which one they wish to use in the first step of the [New issue wizard](https://docs.kentico.com/k81/on-line-marketing-features/e-mail-marketing/working-with-newsletters/writing-static-newsletter-issues.md).

![Selecting templates when creating a new newsletter issue](https://docs.kentico.com/docsassets/k81/preparing-newsletter-templates/selecting_issue_templates.png "Selecting templates when creating a new newsletter issue")
