Browse Source

Conditionally use delivered to address

main
M66B 6 years ago
parent
commit
d88212fc35
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      app/src/main/java/eu/faircode/email/FragmentCompose.java

+ 2
- 1
app/src/main/java/eu/faircode/email/FragmentCompose.java View File

@ -756,7 +756,7 @@ public class FragmentCompose extends FragmentEx {
} }
} }
if (ref.deliveredto != null) {
if (ref.deliveredto != null && (ref.to == null || ref.to.length == 0)) {
try { try {
Log.i(Helper.TAG, "Setting delivered to=" + ref.deliveredto); Log.i(Helper.TAG, "Setting delivered to=" + ref.deliveredto);
ref.to = InternetAddress.parse(ref.deliveredto); ref.to = InternetAddress.parse(ref.deliveredto);
@ -767,6 +767,7 @@ public class FragmentCompose extends FragmentEx {
if (ref.from != null && ref.from.length > 0) { if (ref.from != null && ref.from.length > 0) {
String from = Helper.canonicalAddress(((InternetAddress) ref.from[0]).getAddress()); String from = Helper.canonicalAddress(((InternetAddress) ref.from[0]).getAddress());
Log.i(Helper.TAG, "From=" + from + " to=" + MessageHelper.getFormattedAddresses(ref.to, false));
for (EntityIdentity identity : identities) { for (EntityIdentity identity : identities) {
String email = Helper.canonicalAddress(identity.email); String email = Helper.canonicalAddress(identity.email);
if (from.equals(email)) { if (from.equals(email)) {


Loading…
Cancel
Save