I am trying to change the Site Policy email notification template that is sent before the site is deleted.

I am using a CSOM console application very similar to the one described in following post Site Policy in SharePoint

I am testing this in SharePoint server 2013 and SharePoint Server 2016.

The new template is applied and the policies are using it.

The issue is that I cannot make the tokens for Site URL and Site Deletion date to work tried them as html comments like and just {SiteUrl}, in both cases the tokens itself are in the email HTML that is being sent sent, unfortunately the tokens are not replaced with values. The full HTML template is below:

The Test site <!-- {SiteUrl} --> is set to expire on <!-- {SiteDeleteDate} --> . <br/>

If you have any questions or concerns, please contact your admin.

You can postpone the deleteion here:


2 Answers 2


Check your text format of the mail.

  1. If you are using Outlook client application: File -> Options -> Mail -> Compose messages > Change it to HTML format. enter image description here

  2. If you are using Outlook Web App: Settings -> Options -> settings -> mail -> Compose message in HTML format. enter image description here

  • Thanks for the answer, but it is irrelevant to the question. The tokens are not replaced by SharePoint when the deletion notification is send out.
    – IvanYan
    Commented Jan 2, 2018 at 7:55

Actually the placeholders from the article are wrong.

The correct placeholders are:

SiteUrl: Deletion Date: Mailbox ID:


After I clanged them everything is working as expected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.