diff --git a/FAQ.md b/FAQ.md index 95974bc273..651d69da01 100644 --- a/FAQ.md +++ b/FAQ.md @@ -1080,7 +1080,7 @@ Note that this is independent of receiving messages. **(34) How are identities matched?** Identities are as expected matched by account. -For incoming messages the *to*, *cc*, *bcc*, *(X-)delivered/envelope/original-to* and *from* addresses will be checked (in this order) +For incoming messages the *to*, *cc*, *bcc*, *from* and *(X-)delivered/envelope/original-to* addresses will be checked (in this order) and for outgoing messages (drafts, outbox and sent) only the *from* addresses will be checked. The matched address will be shown as *via* in the addresses section. diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index 3f316b0361..16d3887efa 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -2458,14 +2458,14 @@ class Core { addresses.addAll(Arrays.asList(message.cc)); if (message.bcc != null) addresses.addAll(Arrays.asList(message.bcc)); + if (message.from != null) + addresses.addAll(Arrays.asList(message.from)); if (message.deliveredto != null) try { addresses.add(new InternetAddress(message.deliveredto)); } catch (AddressException ex) { Log.w(ex); } - if (message.from != null) - addresses.addAll(Arrays.asList(message.from)); } // Search for matching identity