Simplified looking up sent messages

pull/213/head
M66B 2 years ago
parent 829694a64e
commit e67efaae3e

@ -2155,7 +2155,12 @@ class Core {
throw new IllegalArgumentException("exists without msgid");
// Search for message
Message[] imessages = ifolder.search(new MessageIDTerm(message.msgid));
Message[] imessages = (account.isOutlook())
? ifolder.search(new HeaderTerm("X-Microsoft-Original-Message-ID", message.msgid))
: ifolder.search(new MessageIDTerm(message.msgid));
// Fallback
if (false)
if (imessages == null || imessages.length == 0)
try {
// Needed for Outlook
@ -2165,6 +2170,7 @@ class Core {
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?
}

@ -208,6 +208,10 @@ public class EntityAccount extends EntityOrder implements Serializable {
return "imap.aol.com".equalsIgnoreCase(host);
}
boolean isICloud() {
return "imap.mail.me.com".equalsIgnoreCase(host);
}
boolean isTransient(Context context) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean enabled = prefs.getBoolean("enabled", true);

Loading…
Cancel
Save