You can use either the IExchangeFolderRules interface or the IExchangeModifyTable interface to add, delete, and edit rules on folders.
The IExchangeFolderRules interface is built on the IExchangeModifyTable interface. It is the preferred interface because it is specifically designed to simplify the task of working with rules. To get a pointer to this interface, call the HrFolderRulesOpen function on the folder to which the rules apply. This interface contains the following methods:
IExchangeFolderRules::HrDelete
IExchangeFolderRules::HrDisable
IExchangeFolderRules::HrEnable
IExchangeFolderRules::HrInsert
Rules are stored in MAPI tables and as such can be accessed through the IExchangeModifyTable interface. To obtain this interface, call the IMAPIProp::OpenProperty method on any property of type PT_OBJECT. This interface contains the following methods:
IExchangeModifyTable::GetLastError
IExchangeModifyTable::GetTable
IExchangeModifyTable::ModifyTable
For general information on rules, see About Rules. For information on specific tasks you can perform to manipulate rules, see the following: