我正在编写一个应用程序,它必须获取可以与规则匹配的项目。
//new messages goes here
void items_ItemAdd(object Item)
{
//all rules
Rules rules = Application.Session.DefaultStore.GetRules();
Outlook.MailItem mail = (Outlook.MailItem)Item;
if (mail != null)
{
// I need to find out if mail matches with one of the rule. And handle in an appropriate way.
}
}