Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
var items = serviceInstance.FindItems(
//Find Mails from Inbox of the given Mailbox
new FolderId(WellKnownFolderName.Inbox, new Mailbox(ConfigurationManager.AppSettings["MailBox"].ToString())),
//Filter criterion
new SearchFilter.SearchFilterCollection(LogicalOperator.And, new SearchFilter[] {
new SearchFilter.ContainsSubstring(ItemSchema.Subject, ConfigurationManager.AppSettings["ValidEmailIdentifier"].ToString()),
new SearchFilter.IsEqualTo(EmailMessageSchema.IsRead, false)
//View Size as 15
new ItemView(15));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.