Merge "Don't remove fromUser email from From header"

This commit is contained in:
Edwin Kempin
2016-04-11 06:12:57 +00:00
committed by Gerrit Code Review

View File

@@ -494,9 +494,10 @@ public abstract class OutgoingEmail {
j.remove(); j.remove();
} }
} }
for (EmailHeader hdr : headers.values()) { for (Map.Entry<String, EmailHeader> entry : headers.entrySet()) {
if (hdr instanceof AddressList) { // Don't remove fromEmail from the "From" header though!
((AddressList) hdr).remove(fromEmail); if (entry.getValue() instanceof AddressList && entry.getKey() != "From") {
((AddressList) entry.getValue()).remove(fromEmail);
} }
} }
} }