1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-22 07:28:49 -05:00

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
This commit is contained in:
mguessan 2014-04-08 20:59:13 +00:00
parent dd1cfea379
commit ad404804ad

View File

@ -70,9 +70,10 @@ public class EwsExchangeSession extends ExchangeSession {
MESSAGE_TYPES.add("MeetingResponse"); MESSAGE_TYPES.add("MeetingResponse");
MESSAGE_TYPES.add("MeetingCancellation"); MESSAGE_TYPES.add("MeetingCancellation");
MESSAGE_TYPES.add("Item");
MESSAGE_TYPES.add("PostItem");
// exclude types from IMAP // exclude types from IMAP
//MESSAGE_TYPES.add("Item");
//MESSAGE_TYPES.add("PostItem");
//MESSAGE_TYPES.add("Contact"); //MESSAGE_TYPES.add("Contact");
//MESSAGE_TYPES.add("DistributionList"); //MESSAGE_TYPES.add("DistributionList");
//MESSAGE_TYPES.add("Task"); //MESSAGE_TYPES.add("Task");
@ -764,12 +765,12 @@ public class EwsExchangeSession extends ExchangeSession {
results.addAll(findItemMethod.getResponseItems()); results.addAll(findItemMethod.getResponseItems());
resultCount = results.size(); resultCount = results.size();
if (resultCount > 0 && LOGGER.isDebugEnabled()) { 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()) +" highest uid: "+results.get(0).get(Field.get("imapUid").getResponseName())
+" lowest uid: "+results.get(resultCount-1).get(Field.get("imapUid").getResponseName())); +" lowest uid: "+results.get(resultCount-1).get(Field.get("imapUid").getResponseName()));
} }
if (Thread.interrupted()) { 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"); throw new IOException("Search items failed: Interrupted by client");
} }
} while (!(findItemMethod.includesLastItemInRange || (maxCount > 0 && resultCount == maxCount))); } while (!(findItemMethod.includesLastItemInRange || (maxCount > 0 && resultCount == maxCount)));