From bfee775b31dc638973178e9a9227861e94f58096 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 27 Aug 2023 07:36:19 +0200 Subject: [PATCH] Added Outlook exists fallback --- app/src/main/java/eu/faircode/email/Core.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index c43b800ab9..9eabb5ffbc 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -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?