开发者

c# find mail by from mail

How to find items in Outlook inbox by from email?

This version works and finds email:

String sCriteria = "[From] = 'Sebastian Nowak'";
Outlook.Items filteredItems = inbox.Items.Restrict(sCriteria);

This version doesn't work, doesn't find any mail:

String sCriteria = "[From] = 'mymail@mydomain.com'";
Outlook.Items filt开发者_JAVA技巧eredItems = inbox.Items.Restrict(sCriteria);

How do I should search by email from which mail was sent?


The property you are looking for is:

inbox.Items.Restrict("[SenderEmailAddress]='mymail@mydomain.com'");

confirmed using Outlook 12.0 library using VS2005

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜