mirror of https://github.com/M66B/FairEmail.git
Simplification
This commit is contained in:
parent
4c1e7eda7e
commit
8d22039163
|
@ -2258,24 +2258,14 @@ class Core {
|
|||
throw new IllegalArgumentException("exists without msgid");
|
||||
|
||||
// Search for message
|
||||
Message[] imessages = (account.isOutlook())
|
||||
? ifolder.search(new HeaderTerm("X-Microsoft-Original-Message-ID", message.msgid))
|
||||
: ifolder.search(new MessageIDTerm(message.msgid));
|
||||
// Alternative, inconsistent for Outlook: X-Microsoft-Original-Message-ID
|
||||
Message[] imessages = ifolder.search(account.isOutlook()
|
||||
? new HeaderTerm(MessageHelper.HEADER_CORRELATION_ID, message.msgid)
|
||||
: new MessageIDTerm(message.msgid));
|
||||
|
||||
// Fallback
|
||||
if (account.isOutlook())
|
||||
if (imessages == null || imessages.length == 0)
|
||||
try {
|
||||
// Needed for Outlook
|
||||
imessages = ifolder.search(
|
||||
new AndTerm(
|
||||
new SentDateTerm(ComparisonTerm.GE, new Date()),
|
||||
new HeaderTerm(MessageHelper.HEADER_CORRELATION_ID, message.msgid)));
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
// iCloud: NO [UNAVAILABLE] Unexpected exception
|
||||
// Seznam: Jakarta Mail Exception: java.io.IOException: Connection dropped by server?
|
||||
}
|
||||
// Searching for random header:
|
||||
// iCloud: NO [UNAVAILABLE] Unexpected exception
|
||||
// Seznam: Jakarta Mail Exception: java.io.IOException: Connection dropped by server?
|
||||
|
||||
// Some email servers are slow with adding sent messages
|
||||
if (retry)
|
||||
|
|
Loading…
Reference in New Issue