Get Message by Unique ID

Standard

You will need the GetBind() method in order to use this code

FIND IN A SPECIFIC FOLDER OR ENUMERATE

You must know in which folder is the message, or you can build a method that search in all folders changing theWellKnownFolderName

ItemView view = new ItemView(100, 0);
SearchFilter sf = new SearchFilter.IsEqualTo(EmailMessageSchema.Id,
  "xxxxxxxxxxxxxxxxx");
FindItemsResults<Item> findResults =
  GetBinding().FindItems(WellKnownFolderName.Inbox, sf, view);
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s