Added Outlook exists fallback

This commit is contained in:
M66B 2023-08-27 07:36:19 +02:00
parent e3619e3b24
commit bfee775b31
1 changed files with 10 additions and 1 deletions

View File

@ -2277,12 +2277,21 @@ class Core {
Message[] imessages = ifolder.search(account.isOutlook()
? new HeaderTerm(MessageHelper.HEADER_CORRELATION_ID, message.msgid)
: new MessageIDTerm(message.msgid));
EntityLog.log(context, "MMM exists" +
EntityLog.log(context, folder.name + " exists" +
" retry=" + retry +
" host=" + account.host +
" outlook=" + account.isOutlook() +
" messages=" + (imessages == null ? null : imessages.length));
if (account.isOutlook() && (imessages == null || imessages.length == 0)) {
EntityLog.log(context, folder.name + " exists alt" +
" retry=" + retry +
" host=" + account.host +
" outlook=" + account.isOutlook() +
" messages=" + (imessages == null ? null : imessages.length));
imessages = ifolder.search(new HeaderTerm("X-Microsoft-Original-Message-ID", message.msgid));
}
// Searching for random header:
// iCloud: NO [UNAVAILABLE] Unexpected exception
// Seznam: Jakarta Mail Exception: java.io.IOException: Connection dropped by server?