---
title: Friends management e-mail templates
---

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

In the **E-mail templates** application, you can find the following e-mail templates related to the **Friends** application:

- **Friends - Friend approval** - template for an e-mail or message confirming that a user approved your friendship request.
- **Friends - Friend rejection** - template for an e-mail or message confirming that a user rejected your friendship request.
- **Friends - Friend request** - template for an e-mail or message informing you that another user requested your friendship.

If you choose to **Edit** () a template, you can see two large text fields:

- **HTML version** - text of the template used for e-mails.
- **Plain text version** - text of the template used for the [Messages](https://docs.kentico.com/k81/community-features/messaging.md) application messages.

Links in these e-mails need to be handled by a special page containing the **Friendship management** web part. This is a special web part that ensures handling of these requests.

## Macros in friendship e-mail templates

In both fields, you can use the following [context macros](https://docs.kentico.com/k81/macro-expressions.md) to include dynamic values in their text:

- **{% managementurl %}** - returns the friendship management page URL. See **Friend management path** in [Friends settings](https://docs.kentico.com/k81/community-features/friends/friends-settings.md) for more details.
- **{% profileurl %}** - returns URL of the user who requested the friendship.
- **{% formattedsendername %}** - returns the name of the user who is requesting the friendship in the _username (fullname)_ format.
- **{% formattedrecipientname %}** - returns the name of the user whose friendship is being requested in the _username (fullname)_ format.

You can also access the following objects and their properties (e.g. _{% Sender.UserName %}_):

- **{% Sender %}** - _UserInfo_ object of the user who is requesting the friendship.
- **{% Recipient %}** - _UserInfo_ object of the user whose friendship is being requested.
- **{% Friendship %}** - _FriendInfo_ object containing information about the current friendship.

You can also use any other macro expressions in the templates.
