Frage

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?

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top