How to temporarily disable the user alerts in SharePoint 2007

How to temporarily disable the user alerts in SharePoint 2007

Is there a way to temporarily disable the user alerts for all employees, after my minor change, enable the user alerts again?

1.

There is a simple stsadm command that will disable alerts: stsadm -o setproperty -pn alerts-enabled -pv False -url http://PortalName
Reference
http://technet.microsoft.com/en-us/library/cc263206.aspx

—————————————————-

2.
temporarily disable email notification while updating items so the system will not send out any unnecessary email.

disable alert, updates item, then enable alert back.

SPList tasklist = Web.Lists[“Tasks”];

tasklist.EnableAssignToEmail = false; //This property makes sending mail disabled

tasklist.Update();

//Do all the update here

Item[“Title”] = “New Title”;
Item.SystemUpdate();

tasklist.EnableAssignToEmail = true; //enable email notification

tasklist.Update();

Leave a Reply

Your email address will not be published. Required fields are marked *

*