I recently got the requirement for a person to receive a daily summary alert for any change within a SharePoint site; each site has an owner who is in charge of the content on their site.
The current way we have something working is to automatically set up alerts for every list/library within the site.
// Get the Lists on this Site
SPListCollection siteLists = currentSite.Lists;
foreach (SPList list in siteLists)
{
if (!list.ToString().Equals("Master Page Gallery"))
{
if (list.ReadSecurity == 1) // user has read access to all items
{
// Create an Alert for this List
Guid alertID = currentUser.Alerts.Add(list, SPEventType.All, SPAlertFrequency.Daily);
// Set any additional properties
SPAlert newAlert = currentUser.Alerts[alertID];
}
}
}
This creates two problems:
- The user has a lot of different alerts created. Ideal: Only ONE email with the daily summary.
- Some sort of monitor would have to be set up to check for new lists or libraries in the site and automatically set up alerts for the user.
Q: How can I create a daily summary alert for all changes in a site?