How to change the Alert Email notification message for Announcements
Yes, you all know the kind of messages I mean. I was asked yesterday if there was a way to remove some data from those announcement messages that are sent out when you have enabled alerting on a announcement list. It turns out that you can change this for about any alert in MOSS/WSS
The typical announcement message looks something like this:
|
Modify my alert settings |
| |
View Test Item. |
| |
View Announcements | | |
| |
| Title: |
Test Item |
|
| Body: |
Test Body Text |
|
| Expires: |
18/01/2008 |
|
| Last Modified 7/01/2008 14:51 by System Account |
Well, one of our users wanted us to remove the Title, Body and Expires Field from the mail message.
So I did a little research and found out that the place to make this change is the alerttemplates.xml file.
I was guided somewhere to the following document on the net http://www.combined-knowledge.com/Downloads/Modify_Alert_Notifications.pdf (I attached the document to this post)
Another source I used is: http://www.topxml.com/rbnews/XML/re-70019_Customizing-Alert-Notifications-and-Alert-Templates-in-Windows-SharePoint-Services-3-0.aspx
Anyway in short I ended up changing the following lines in the xml file in the <AlertTemplate Type="List" Name="SPAlertTemplateType.Announcements"> section:
from:
<Properties> <ImmediateNotificationExcludedFields>ID;Author;Editor;Modified_x0020_By;Created_x0020_By;_UIVersionString;ContentType;TaskGroup;IsCurrent;Attachments;NumComments;</ImmediateNotificationExcludedFields> <DigestNotificationExcludedFields>ID;Author;Editor;Modified_x0020_By;Created_x0020_By;_UIVersionString;ContentType;TaskGroup;IsCurrent;Attachments;NumComments;</DigestNotificationExcludedFields> </Properties>
to:
<Properties>
<ImmediateNotificationExcludedFields>ID;Title;Body;Expires;Author;Editor;Modified_x0020_By;Created_x0020_By;_UIVersionString;ContentType;TaskGroup;IsCurrent;Attachments;NumComments;</ImmediateNotificationExcludedFields> <DigestNotificationExcludedFields>ID;Title;Body;Expires;Author;Editor;Modified_x0020_By;Created_x0020_By;_UIVersionString;ContentType;TaskGroup;IsCurrent;Attachments;NumComments;</DigestNotificationExcludedFields>
</Properties>
this tells SharePoint to longer show the fields Title, Body and Expires in the alert
Once edited and saved, you need to enable this as follows:
-
copy the modifed xml into the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\xml of every FrontEnd server in your farm
-
execute command stsadm -o updatealerttemplates -filename <your modified xml file> -url <your site>
-
execute iisreset on every Frontend
-
restart the Windows Sharepoint Services Timer service
Of course, if you are looking for changing some other type of alert besides Announcements, you need to make the necessary changes in the corresponding section of the xml file. The available sections are: