mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-04 06:20:26 +00:00
Simplify retry sending after fatal errors
This commit is contained in:
parent
a246a5cb4f
commit
6ffec50cd0
1 changed files with 10 additions and 0 deletions
|
@ -352,6 +352,16 @@ public class ServiceSend extends ServiceBase {
|
||||||
// Restore snooze timers
|
// Restore snooze timers
|
||||||
for (EntityMessage message : db.message().getSnoozed(outbox.id))
|
for (EntityMessage message : db.message().getSnoozed(outbox.id))
|
||||||
EntityMessage.snooze(this, message.id, message.ui_snoozed);
|
EntityMessage.snooze(this, message.id, message.ui_snoozed);
|
||||||
|
|
||||||
|
// Retry failed message
|
||||||
|
for (long id : db.message().getMessageByFolder(outbox.id)) {
|
||||||
|
int ops = db.operation().getOperationCount(outbox.id, id, EntityOperation.SEND);
|
||||||
|
if (ops == 0) {
|
||||||
|
EntityMessage message = db.message().getMessage(id);
|
||||||
|
if (message != null)
|
||||||
|
EntityOperation.queue(this, message, EntityOperation.SEND);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onSend(EntityMessage message) throws MessagingException, IOException {
|
private void onSend(EntityMessage message) throws MessagingException, IOException {
|
||||||
|
|
Loading…
Reference in a new issue