Fixed fetching reply-to address

Who had thought that get 'reply-to' would return 'to' if not present?
This commit is contained in:
M66B 2018-08-14 17:23:35 +00:00
parent 794e3d86b7
commit f25ca38376
1 changed files with 5 additions and 1 deletions

View File

@ -211,7 +211,11 @@ public class MessageHelper {
}
Address[] getReply() throws MessagingException {
return imessage.getReplyTo();
String[] headers = imessage.getHeader("Reply-To");
if (headers != null && headers.length > 0)
return imessage.getReplyTo();
else
return null;
}
static String getFormattedAddresses(Address[] addresses, boolean full) {