Added default EML for POP3

This commit is contained in:
M66B 2021-09-05 22:25:26 +02:00
parent 197e366144
commit 38ebc90f5f
1 changed files with 13 additions and 0 deletions

View File

@ -2389,6 +2389,7 @@ class Core {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean sync_quick_pop = prefs.getBoolean("sync_quick_pop", true);
boolean notify_known = prefs.getBoolean("notify_known", false);
boolean download_eml = prefs.getBoolean("download_eml", false);
boolean pro = ActivityBilling.isPro(context);
boolean force = jargs.optBoolean(5, false);
@ -2689,6 +2690,18 @@ class Core {
if (attachment.subsequence == null)
parts.downloadAttachment(context, attachment);
if (download_eml)
try {
File raw = message.getRawFile(context);
try (OutputStream os = new BufferedOutputStream(new FileOutputStream(raw))) {
imessage.writeTo(os);
}
message.raw = true;
db.message().setMessageRaw(message.id, message.raw);
} catch (Throwable ex) {
Log.w(ex);
}
EntityContact.update(context, account, folder, message);
} catch (Throwable ex) {