---
title: Managing forum subscriptions
---

> 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).

Forum subscriptions allow users to receive email notifications when a new post is added to a selected forum or as a reply to a specific post. Users can subscribe directly while browsing through forums on the live site.

Forum subscriptions are enabled by default. You can limit which users can subscribe to a certain forum while editing this forum on the **Security** tab.

You can disable subscriptions in the properties of the web part that [displays forums](https://docs.kentico.com/k10/community-features/forums/publishing-a-predefined-forum-on-the-website.md).

## Enabling double opt-in

To make users confirm that the email address they are subscribing with really exists and belongs to them, you can enable the double opt‑in functionality. With double opt‑in enabled, subscribers receive an email with a confirmation link. They have to click this link to create their subscription.

To enable double opt‑in globally for all forums:

1. Go to **Settings -> Community -> Forums**.
2. Check the **Enable double opt-in for forums** setting.
3. Specify how long you want the confirmation links to be valid in the **Double opt-in interval (hours)** setting.

The following two steps are optional. If you skip them, the system will use the default approval page located in _\~/CMSModules/Forums/CMSPages/SubscriptionApproval.aspx_.

1. Place the **Forum subscription confirmation** web part on a new page. Adjust its properties according to your needs.
2. Enter the page path into the **Double opt-in approval page path** setting.

Double opt-in is now configured for all forums. You can override the settings for each forum group in its properties in the **Forums** application. You can also define specific settings for selected forums.

The functionality uses the **Forums - Subscription request** [email template](https://docs.kentico.com/k10/configuring-kentico/managing-email-templates.md). You can insert the confirmation link into the template using the `{%SubscriptionLink%}` macro.

## Unsubscription

Users can cancel their forum subscriptions at any time by clicking the unsubscription link included in each notification email about a new post (when using the default email template).

![New forum post notification e-mail](https://docs.kentico.com/docsassets/k10/managing-forum-subscriptions/post_notification_email.png "New forum post notification e-mail")

The link leads to a page that automatically processes the unsubscription request and deletes the appropriate subscription. The subscription is identified through a parameter passed in the query string of the link's URL.

This is handled either by the _\~/CMSPages/Unsubscribe.aspx_ system page, or by a custom unsubscription page created for the website. If you wish to use a custom page, it is necessary to place the **Forum unsubscription** web part onto the page. You then need to enter the URL of this page into the **Forum unsubscription URL** field of the given forum or forum group. (The value can also be inherited from the website's **Forum unsubscription URL** setting, specified in **Settings -> Community-> Forums**.)

> **Info:** **Subscription e-mails and the Forum base URL**
>
> It is important to set a correct **Forum base URL** value in the forum configuration so that the subscription notifications and other related emails contain valid links leading to the appropriate forum.
>
> When entering the value, you can use the relative URL of the page where the forum is located, for example: _\~/Community/Forums.aspx_

Alternatively, users with access to the administration interface can view all their active forum subscriptions on the **Subscriptions** tab in the **My profile** application, and manually **Unsubscribe** as needed.

For live site users, the same options can be provided by the **My account** web part, as long as its **Display my subscriptions** and **Display forum subscriptions** properties are enabled.

## Managing subscriptions

When editing a forum in the **Forums** application, administrators can manage all of the given forum's subscriptions on the **Subscriptions** tab.

## Email templates

Post notification emails are sent to subscribed users based on the **Forums - New post** email template. Notifications informing users about their forum subscriptions or unsubscriptions are based on the **Forums - Subscription confirmation** and **Forums - Unsubscription confirmation** templates. If you have double opt-in enabled for forums, the email that is sent upon requesting subscription is based on the **Forums - Subscription request** template.

You can edit the templates in the **Email templates** application.

You can use the following  [context macros](https://docs.kentico.com/k10/macro-expressions.md) in forum subscription email templates:

- **{% ForumDisplayName %}** - display name of the related forum.
- **{% ForumName %}** - code name of the related forum.
- **{% ForumDescription %}** - resolves into the description text of the forum.
- **{% GroupDisplayName %}** - display name of the related forum group.
- **{% GroupName %}** - code name of the related forum group.
- **{% GroupDescription %}** - description text of the forum group.
- **{% PostSubject %}** - the subject of the new forum post that caused the notification to be sent.
- **{% PostText %}** - resolves into HTML content of the new post.
- **{% PostTextPlain %}** - resolves into a plain text version of the new post's content.
- **{% PostUsername %}** - the name of the user who created the post.
- **{% PostTime %}** - the date and time when the new post was added.
- **{% Link %}** - resolves into a link to the new post.
- **{% UnsubscribeLink %}** - generates a link that can be used to unsubscribe from the given forum.

The following macros are available for (un)subscription notifications:

- **{% Subject %}** - if the user is subscribed to a specific post, this resolves into the subject of the given post. Otherwise, it returns an empty string.
- **{% Separator %}** - if the user is subscribed to a specific post, this returns the value of the _forums.confirmationtemplateseparator_ resource string (" - " by default). Can be placed between the name of the forum and the subject of the post to cover both possible subscription scenarios.

The following macro is available when double opt-in is enabled:

- **{% SubscribeLink %}** - contains the URL of a page used to confirm subscriptions.

You can also access the following related objects and their properties (for example **{% ForumPost.PostViews %}** ):

- **{% ForumPost %}** - _ForumPostInfo_ object of the post to which the user is subscribed (if applicable).
- **{% Forum %}** - _ForumInfo_ object representing the forum to which the user is subscribed.
- **{% ForumGroup %}** - _ForumGroupInfo_ object of the forum group containing the given forum.
- **{% Subscriber %}** - _ForumSubscriptionInfo_ object representing subscription of the recipient to the given forum. Only available for the _New post_ template.
