mirror of https://github.com/M66B/FairEmail.git
POP3 download raw messages for existing messages
This commit is contained in:
parent
c640571c4c
commit
f633c24959
|
@ -2554,6 +2554,27 @@ class Core {
|
|||
if (msgIdTuple.containsKey(msgid)) {
|
||||
_new = false;
|
||||
Log.i(account.name + " POP having " + msgid + "/" + uidl);
|
||||
|
||||
if (download_eml)
|
||||
try {
|
||||
TupleUidl tuple = msgIdTuple.get(msgid);
|
||||
if (tuple == null)
|
||||
continue;
|
||||
|
||||
File raw = EntityMessage.getRawFile(context, tuple.id);
|
||||
if (raw.exists())
|
||||
continue;
|
||||
|
||||
Log.i(account.name + " POP raw " + msgid + "/" + uidl);
|
||||
try (OutputStream os = new BufferedOutputStream(new FileOutputStream(raw))) {
|
||||
imessage.writeTo(os);
|
||||
}
|
||||
|
||||
db.message().setMessageRaw(tuple.id, true);
|
||||
} catch (Throwable ex) {
|
||||
Log.w(ex);
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue