Platform SDK: Exchange Server

Working with Rules

You can use either the Rule COM component or the IExchangeModifyTable interface to add, delete, and edit rules on folders.

The IExchangeModifyTable Interface

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

The Rule COM component

You can use the new Rule sample COM component to manipulate folder rules. The sample internally used MAPI to communicate with the Exchange store. The object model provides an intuitive representation of rules, rule conditions, and actions to take when those conditions are met.

For general information on rules, see About Rules. For information on specific tasks you can perform to manipulate rules, see the following:

Creating a Rule

Reading Rule Contents

Modifying Rules