Question

I am using EWS Java API to read Outlook inbox. The inbox can contain contacts items and calendar items.

I want to retrieve only the email messages, how to do that?

Était-ce utile?

La solution

This can be done by checking on the item type as follows:

if(myItem.getItemClass().equals("IPM.Note")){
   // this is an email
}

all item types can be found here:

http://msdn.microsoft.com/en-us/library/office/bb176446(v=office.12).aspx

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top