Last active
April 19, 2016 05:04
-
-
Save VibhuKuchhal/0a5ca2173ff6a45c11d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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