Friends management email templates

In the Email templates application, you can find the following email templates related to the Friends application:

  • Friends - Friend approval - template for an email or message confirming that a user approved your friendship request.
  • Friends - Friend rejection - template for an email or message confirming that a user rejected your friendship request.
  • Friends - Friend request - template for an email 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 emails.
  • Plain text version - text of the template used for the Messages application messages.

Links in these emails 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 email templates

In both fields, you can use the following context macros to include dynamic values in their text:

  • {% managementurl %} - returns the friendship management page URL. See Friend management path in Settings - Friends 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.