---
title: Enable email subscriptions
related:
  - https://docs.kentico.com/documentation/business-users/digital-marketing/emails.md
  - https://docs.kentico.com/documentation/business-users/digital-marketing/emails/send-regular-emails-to-subscribers.md
  - https://docs.kentico.com/documentation/developers-and-admins/digital-marketing-setup/email-channel-management.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).

> **License:** **Email license requirements**
>
> The license tier required for email features depends on the size of the [email channels](https://docs.kentico.com/documentation/developers-and-admins/digital-marketing-setup/email-channel-management.md) that you use:
>
> - Email microchannels – available for all license tiers
> - Standard size email channels – require the **Advanced** license tier
>
> To learn more, see the description of the [Channel size](https://docs.kentico.com/documentation/developers-and-admins/digital-marketing-setup/email-channel-management.md#create-and-configure-email-channels) property for email channels.

To allow your marketing team to send [regular emails to subscribers](https://docs.kentico.com/documentation/business-users/digital-marketing/emails/send-regular-emails-to-subscribers.md), you need to configure your application to correctly handle subscription and unsubscription links:

1. [Enable the email marketing feature](#enable-the-email-marketing-feature)
2. [Set an appropriate service domain for your email channels](#set-the-service-domain-for-your-email-channels)

## Enable the email marketing feature

To allow the system to handle subscription confirmations and unsubscriptions for email recipient lists, the email marketing feature must be enabled for your Xperience application:

1. Open your Xperience solution in Visual Studio.
2. Edit the **Program.cs** file.
3. [Enable](https://docs.kentico.com/documentation/developers-and-admins/development/website-development-basics/configure-new-projects/enable-application-features.md) the email marketing feature by calling the `UseEmailMarketing` method of the `IFeaturesBuilder` delegate. Pass the delegate as an argument to `AddKentico`.

   ```csharp title="Program.cs"
   using Kentico.Web.Mvc;
   using Kentico.OnlineMarketing.Web.Mvc;

   var builder = WebApplication.CreateBuilder(args);  

   ...

   builder.Services.AddKentico(features =>
   {
       ...

       // Enables the email marketing feature, registers the following endpoints:
       // "/Kentico.Emails/SubscriptionConfirmation"
       // "/Kentico.Emails/Unsubscribe"
       features.UseEmailMarketing();
   });
   ```

The subscription confirmation and unsubscription endpoints are now available for all [email channels](https://docs.kentico.com/documentation/developers-and-admins/digital-marketing-setup/email-channel-management.md).

## Set the service domain for your email channels

To correctly resolve subscription confirmation and unsubscription links in emails, your [email channels](https://docs.kentico.com/documentation/developers-and-admins/digital-marketing-setup/email-channel-management.md) must have a correctly set **Email service domain**. The service domain name is used as the base URL for these links.

The service domain needs to host an Xperience by Kentico application, connected to the database where your email channels are configured.

- The email service domain must **exactly** match the target application's URL, including the port number and application path. Misconfiguration may cause broken links in email content, particularly in development or testing environments.
- The target application must support the URL scheme (protocol) specified by the application's `UrlResolveOptions.UseSSL` [option](https://docs.kentico.com/documentation/developers-and-admins/development/content-retrieval/retrieve-page-content/retrieve-page-urls.md#url-formatting-and-behavior) and the [.NET options pattern](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/configuration/options?view=aspnetcore-8.0) – **https** by default.

The most common setup is to use the domain of a related [website channel](https://docs.kentico.com/documentation/developers-and-admins/configuration/website-channel-management.md) as the service domain of your email channels. If you do not wish to associate URLs in your email content with a specific website, you can use the domain hosting the Xperience application where you manage your emails (if the application is publicly accessible).
