1

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?

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
Mahmoud Saleh
  • 33,303
  • 119
  • 337
  • 498

1 Answers1

0

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

Mahmoud Saleh
  • 33,303
  • 119
  • 337
  • 498