C # find email from mail

How to find items in an Outlook mailbox by email?

This version works and finds email:

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

This version does not work, does not find mail:

String sCriteria = "[From] = 'mymail@mydomain.com'";
Outlook.Items filteredItems = inbox.Items.Restrict(sCriteria);

How do I search by email from the fact that an email has been sent.

+3
source share
1 answer

The property you are looking for is:

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

verified using Outlook 12.0 library using VS2005

+4
source

Source: https://habr.com/ru/post/1744917/


All Articles