diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index 59ff4e4fe8..8a91cc86e3 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -1870,7 +1870,7 @@ public class ServiceSynchronize extends LifecycleService { } if (message == null) { - Address[] tos = (folder.isOutgoing() ? helper.getFrom() : helper.getTo()); + Address[] tos = (EntityFolder.SENT.equals(folder.type) ? helper.getFrom() : helper.getTo()); EntityIdentity identity = null; if (tos != null && tos.length > 0) { String to = ((InternetAddress) tos[0]).getAddress(); @@ -1881,7 +1881,7 @@ public class ServiceSynchronize extends LifecycleService { if (identity == null) identity = db.identity().getIdentity(folder.account, Helper.canonicalAddress(to)); - if (identity == null && !folder.isOutgoing()) { + if (identity == null && !EntityFolder.SENT.equals(folder.type)) { to = helper.getDeliveredTo(); if (!TextUtils.isEmpty(to)) identity = db.identity().getIdentity(folder.account, to);