Last month a customer asked me if they could modify SharePoint alert notifications? Of course you can was my confident answer! My understanding being they wished to customise the emails sent by SharePoint via e-mail subscription notification service in wss 3.0. This covers changes made to list items (item level alert), documents, lists (list level alert) or document libraries, basically any SharePoint list type. However, this was not the case! The customer was already pretty well clued in and aware of AlertTemplates.xml and it's inner workings. If you are not, there are two great articles worth reading on Microsoft SharePoint Developer Documentation Team blog:

Customizing Alert Notifications and Alert Templates in Windows SharePoint Services 3.0

How To: Customizing alert emails using IAlertNotifyHandler

There is also a whitepaper from All MindsharpBlogs that is worth reading:

Modify Alert Notifications using AlertTemplates.xml in SharePoint 2007

So what other notifications would you need to customise I wondered? Well how about emails sent from SharePoint to notify a user when permissions are granted or modified on a list item, document, list or document library (see figure 1 below):


Figure 1: Email notification from SharePoint

Where can we customise the text and links circled in red? I did a deep dive on this and my conclusion unfortunately is not a good one. You can't!

I opened up AcIinv.aspx (Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS). Aclinv.aspx is a page used in SharePoint to grant permissions to a user and generates the email as depicted in figure 1.


Figure 2: Aclinv.aspx (Add Users)

Within Aclinv.aspx I found the following:

<%@ Assembly Name="Microsoft.SharePoint.ApplicationPages, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%> <%@ Page Language="C#" Inherits="Microsoft.SharePoint.ApplicationPages.AclInv" ......%>

This helped me to snoop into the assembly and identify the method SendEmailInvitation(PeopleEditor picker, string subject, string message) which is used to send the email. It also confirmed that it was not possible to modify the text or links circled in Figure 1 but only the email body text.

I hope this helps you in some way. BTW: If you wish to pre-populate the Personal Message in Aclinv.aspx this can be achieved by simply modifying the JavaScript function UpdateEmailSubject() .... it's nice to end a blog on a positive note :)