Merge pull request #4575 from k9mail/MimeMessage_setReplyTo

Use AddressHeaderBuilder for MimeMessage.setReplyTo()
This commit is contained in:
cketti 2020-03-02 14:33:49 +01:00 committed by GitHub
commit e4cc7b9a91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 16 deletions

View file

@ -222,21 +222,6 @@ public class Address implements Serializable {
}
}
public static String toEncodedString(Address[] addresses) {
if (addresses == null) {
return null;
}
StringBuilder sb = new StringBuilder();
for (int i = 0; i < addresses.length; i++) {
sb.append(addresses[i].toEncodedString());
if (i < addresses.length - 1) {
sb.append(',');
}
}
return sb.toString();
}
/**
* Unpacks an address list previously packed with packAddressList()
* @param addressList Packed address list.

View file

@ -320,7 +320,7 @@ public class MimeMessage extends Message {
removeHeader("Reply-to");
mReplyTo = null;
} else {
setHeader("Reply-to", Address.toEncodedString(replyTo));
setHeader("Reply-to", AddressHeaderBuilder.createHeaderValue(replyTo));
mReplyTo = replyTo;
}
}