From ad404804ad67db1046e8db3a01dc6e33fd9202e5 Mon Sep 17 00:00:00 2001 From: mguessan Date: Tue, 8 Apr 2014 20:59:13 +0000 Subject: [PATCH] EWS: Allow Item and PostItem elements in message folders git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2286 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/exchange/ews/EwsExchangeSession.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/java/davmail/exchange/ews/EwsExchangeSession.java b/src/java/davmail/exchange/ews/EwsExchangeSession.java index e4aba6aa..5c1514f2 100644 --- a/src/java/davmail/exchange/ews/EwsExchangeSession.java +++ b/src/java/davmail/exchange/ews/EwsExchangeSession.java @@ -70,9 +70,10 @@ public class EwsExchangeSession extends ExchangeSession { MESSAGE_TYPES.add("MeetingResponse"); MESSAGE_TYPES.add("MeetingCancellation"); + MESSAGE_TYPES.add("Item"); + MESSAGE_TYPES.add("PostItem"); + // exclude types from IMAP - //MESSAGE_TYPES.add("Item"); - //MESSAGE_TYPES.add("PostItem"); //MESSAGE_TYPES.add("Contact"); //MESSAGE_TYPES.add("DistributionList"); //MESSAGE_TYPES.add("Task"); @@ -764,12 +765,12 @@ public class EwsExchangeSession extends ExchangeSession { results.addAll(findItemMethod.getResponseItems()); resultCount = results.size(); if (resultCount > 0 && LOGGER.isDebugEnabled()) { - LOGGER.debug("Search items current count: "+resultCount+" fetchCount: "+fetchCount + LOGGER.debug("Folder " + folderPath + " - Search items current count: "+resultCount+" fetchCount: "+fetchCount +" highest uid: "+results.get(0).get(Field.get("imapUid").getResponseName()) +" lowest uid: "+results.get(resultCount-1).get(Field.get("imapUid").getResponseName())); } if (Thread.interrupted()) { - LOGGER.debug("Search items failed: Interrupted by client"); + LOGGER.debug("Folder " + folderPath + " - Search items failed: Interrupted by client"); throw new IOException("Search items failed: Interrupted by client"); } } while (!(findItemMethod.includesLastItemInRange || (maxCount > 0 && resultCount == maxCount)));