SharePoint 2010: How to remove "Email Headers" information from alert emails

You setup a SharePoint 2010 library to accept incoming emails. This operation adds a few new columns to the library such as Email Headers. However when SharePoint sends email alerts to the subscribers of the list and list item changes, the text in the email includes email headers information as well. You would like to know how to customize the alert template to remove the email headers text from it.
How to article

Follow the below steps to resolve the issue described above. We will consider DiscussionBoard as our SharePoint 2010 library of choice to subscribe for alerts:

  1. Create a copy of the “alerttemplates.xml” file in the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\XML folder and name it say “customalerttemplates.xml”.
  2. Open the “customalerttemplates.xml” file in notepad or Visual Studio and find the SharePoint library of your choice i.e. DiscussionBoard in our case.
  3. Keep scrolling through the alert template definition for this library until you find an element named: <Properties>
    This element originally has the following text:

  4. Modify this element to add the fields that you would like the email alert to exclude and remove the fields that you would want the email alert to include. e.g. below is the representation of the <Properties> element where we exclude the “E-Mail Headers” field and include the “ID” field in the email alert text:

  5. Save the modified “customalerttemplates.xml” file.
  6. Now we need to update our new alert templates' file to the SharePoint Database, so as to replace the default alerttemplates.xml file. We will use the below STSADM command to perform this activity:

    C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN>stsadm -o updatealerttemplates -url "http://servername:18000" -filename "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\XML\customalerttemplates.xml"
  7. Perform IISRESET.

    The above steps will modify the alert template for your specific choice of library (viz. Discussion Board). Now if you trigger an email from SharePoint to be sent to the subscribed users, you will notice that the E-mail Headers field has been removed and the ID field has been added to the text of the email.
More Information

NOTE: The same steps given above can be used to exclude or include any other column value in the text of the alert email sent by SharePoint 2010. You need to know the internal names of the the columns you wish to exclude or include in the alert email text. The internal names of list columns can be found by writing simple object model code that uses the following line of code:


e.g. oList.Fields["Created By"].InternalName;

Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Article ID: 2404173 - Last Review: 10/21/2012 18:49:00 - Revision: 6.0

Microsoft SharePoint Server 2010

  • KB2404173