|
|
@ -1517,6 +1517,7 @@ public class FragmentFolders extends FragmentBase {
|
|
|
|
while ((line.value = br.readLine()) != null) {
|
|
|
|
while ((line.value = br.readLine()) != null) {
|
|
|
|
line.value += "\n";
|
|
|
|
line.value += "\n";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
MimeMessage imessage = new MimeMessage(isession, new InputStream() {
|
|
|
|
MimeMessage imessage = new MimeMessage(isession, new InputStream() {
|
|
|
|
private int i = 0;
|
|
|
|
private int i = 0;
|
|
|
|
|
|
|
|
|
|
|
@ -1547,8 +1548,10 @@ public class FragmentFolders extends FragmentBase {
|
|
|
|
String msgid = helper.getPOP3MessageID();
|
|
|
|
String msgid = helper.getPOP3MessageID();
|
|
|
|
|
|
|
|
|
|
|
|
int count = db.message().countMessageByMsgId(folder.id, msgid, true);
|
|
|
|
int count = db.message().countMessageByMsgId(folder.id, msgid, true);
|
|
|
|
if (count == 1)
|
|
|
|
if (count == 1) {
|
|
|
|
|
|
|
|
EntityLog.log(context, "Import: message exists msgid=" + msgid);
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Long sent = helper.getSent();
|
|
|
|
Long sent = helper.getSent();
|
|
|
|
long received = helper.getPOP3Received();
|
|
|
|
long received = helper.getPOP3Received();
|
|
|
@ -1681,6 +1684,15 @@ public class FragmentFolders extends FragmentBase {
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
Log.w(ex);
|
|
|
|
Log.w(ex);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
|
|
|
|
Log.e(ex);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EntityLog.log(context, "Import error=" + Log.formatThrowable(ex, false));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Resync
|
|
|
|
|
|
|
|
while (line.value != null && !line.value.startsWith("From "))
|
|
|
|
|
|
|
|
line.value = br.readLine();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (line.value == null)
|
|
|
|
if (line.value == null)
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|