---
title: Writing marketing emails
related:
  - https://docs.kentico.com/k10/on-line-marketing-features/configuring-and-customizing-your-on-line-marketing-features/configuring-email-marketing/preparing-email-templates.md
  - https://docs.kentico.com/k10/on-line-marketing-features/managing-your-on-line-marketing-features/email-marketing/creating-email-campaigns.md
  - https://docs.kentico.com/k10/on-line-marketing-features/managing-your-on-line-marketing-features/email-marketing/creating-newsletters.md
  - https://docs.kentico.com/k10/on-line-marketing-features/managing-your-on-line-marketing-features/email-marketing/sending-marketing-emails.md
  - https://docs.kentico.com/k10/configuring-kentico/configuring-smtp-servers.md
  - https://docs.kentico.com/k10/on-line-marketing-features/configuring-and-customizing-your-on-line-marketing-features/configuring-email-marketing/integrating-email-feeds-into-sites.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).

After you have created an [email campaign](https://docs.kentico.com/k10/on-line-marketing-features/managing-your-on-line-marketing-features/email-marketing/creating-email-campaigns.md) or a [template-based newsletter](https://docs.kentico.com/k10/on-line-marketing-features/managing-your-on-line-marketing-features/email-marketing/creating-newsletters.md#creating-a-template-based-newsletter), you can start preparing the content of template-based marketing emails.

The following steps demonstrate how to create a sample email:

1. Open the **Email marketing** application on the **Email feeds** tab.
2. **Edit** () an email campaign or a template-based newsletter.
3. Click **Create new email**.
4. On the **Content** tab, fill in the **Subject** field.
5. (Optional) [Specify UTM parameters](#tagging-email-links-with-utm-parameters) used in the campaign links.
6. Fill in the email's content.
7. (Optional) Add a condition, such as a reader's first name, using the **Insert macro&#x20;**&#x20; button in the editor toolbar.

   1. Place the cursor into the text editor.
   2. Click the **Insert macro&#x20;**&#x20;  button.
   3. An **Insert Macro** dialog opens.

      ![Inserting macro into an email](https://docs.kentico.com/docsassets/k10/writing-marketing-emails/inserting_macro.png "Inserting macro into an email")
   4. Click the macro tree item you want to use. 

      For an additional tutorial about the uses of macros in marketing emails, see the following video:

      **How To: Use Subscriber Macros in Email Marketing**

      > **Note:** **Email templates**
      >
      > The overall structure of this email is defined by the default _Email_ template, which you can find on the **Template management** tab of the **Email marketing** application. See [Preparing email templates](https://docs.kentico.com/k10/on-line-marketing-features/configuring-and-customizing-your-on-line-marketing-features/configuring-email-marketing/preparing-email-templates.md) for more information.
      >
      > Template-based marketing emails can have multiple templates assigned. In this case, expand **Show advanced options and UTM tracking settings**  next to the   ****Subject****  field, where you can choose a template for the new email.
8. (Optional) Add attachments to the email. We recommend attaching any assets, such as images or PDF files via Media libraries:

   1. Upload the files that you want to add to a [media library](https://docs.kentico.com/k10/managing-website-content/working-with-files/media-library-files/inserting-files-into-media-libraries.md).
   2. In the email, click on where you want to link the attachment.
   3. In the text editor, click **Insert/Edit link** (for adding links) OR **Insert/Edit image or media** (for displaying assets directly in the email).
   4. On the **Media libraries** tab, select the file that you want to link.
   5. Adjust the properties, such as **Link text** if you're adding text.
   6. **Save & Close**.\
      The advantage of this approach is that the file in the email will always point to the most up-to-date file stored in the media library. Also, this approach is better performance-wise as it doesn't affect performance when sending the email the way attaching a file using the **Attachments** button does.
9. Click **Save**.

   > **Tip:** Once you save the email, you can manage it using the following actions:
   >
   > - **Spell check** – helps you correct the misspelled words in the title, teaser and text editors.
   > - **Send draft** – allows you to send a test draft of the email to any email address. Draft emails do not correctly resolve email macros (such as unsubscription links) because the recipients are not linked to contacts in the system.
   > - **Preview** – opens a dialog window where you can view what the email will look like for specific recipients.
   > - **Attachments** – allows you to attach files to the email, such as images, an event agenda, white papers, etc. However, we recommend using the approach described in the above scenario to attach files to marketing emails.
   > - **Create A/B test** – may be used to prepare an A/B test for the email. This allows you to create several different versions of the email, evaluate them on a test group of recipients and then send out the most successful one. Clicking this button adds the first testing variant of the email. See [A/B testing marketing emails](https://docs.kentico.com/k10/on-line-marketing-features/managing-your-on-line-marketing-features/email-marketing/a-b-testing-marketing-emails.md).

Now that you have prepared the content of your template-based marketing emails, you can [add their recipients](https://docs.kentico.com/k10/on-line-marketing-features/managing-your-on-line-marketing-features/email-marketing/sending-marketing-emails.md#adding-recipients-to-email-campaigns) and proceed to [send the emails](https://docs.kentico.com/k10/on-line-marketing-features/managing-your-on-line-marketing-features/email-marketing/sending-marketing-emails.md#sending-template-based-marketing-emails).

## Tagging email links with UTM parameters

To be able to better analyze your marketing campaigns, you can specify UTM parameters in marketing emails. The parameters are then added to all the links leading from the email to your site. This allows you to better track your marketing campaigns.

You can add the following parameters:

- **UTM source** (Campaign source) - identifies the source of the traffic. For example, a search engine, email campaign, referral site or other sources.
  - Set to _Email-campaign-name\_campaign-email_ by default.
- **UTM medium** (Campaign medium) - identifies the medium the link was used in.
  - Always set to 'email' in Kentico campaign emails.
- **UTM campaign** (Campaign name) - identifies a specific campaign or a promotion.
  - You can select an existing Kentico campaign or use a custom campaign name, for example for campaigns specified outside of Kentico.

### Adding UTM parameters to email links

1. Open the **Email marketing** application on the **Email feeds** tab.
2. **Edit** () an email campaign or a template-based newsletter.
3. **Edit** () the marketing email where you want to use UTM parameters.
4. On the **Content** tab, click _Show advanced options and UTM tracking settings_.
5. Enable **Tag email links with UTM parameters**.
6. Specify the UTM parameters.
7. Click **Save**.

All the email links leading back to your site will now be tagged by the specified UTM parameters.

**Note**: UTM parameters are shared across marketing email [A/B test variants](https://docs.kentico.com/k10/on-line-marketing-features/managing-your-on-line-marketing-features/email-marketing/a-b-testing-marketing-emails.md).
