Merge pull request #4575 from k9mail/MimeMessage_setReplyTo
Use AddressHeaderBuilder for MimeMessage.setReplyTo()
This commit is contained in:
commit
e4cc7b9a91
2 changed files with 1 additions and 16 deletions
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue