Select identity by canonical address

This commit is contained in:
M66B
2018-08-23 14:36:19 +00:00
parent bdc4110ca8
commit 9d1fcf8ebc
2 changed files with 11 additions and 2 deletions

View File

@@ -805,9 +805,10 @@ public class FragmentCompose extends FragmentEx {
// Select identity matching from address
if (!found && draft.from != null && draft.from.length > 0) {
String from = ((InternetAddress) draft.from[0]).getAddress();
String from = Helper.canonicalAddress(((InternetAddress) draft.from[0]).getAddress());
for (int pos = 0; pos < identities.size(); pos++) {
if (identities.get(pos).email.equals(from)) {
if (Helper.canonicalAddress(identities.get(pos).email).equals(from)) {
spFrom.setSelection(pos);
found = true;
break;