changeset 1253:23e8f93055a4

mail - add reply-to
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 02 Sep 2018 08:33:54 -0600
parents aa8517d7c065
children beebd0f5f2ba
files src/luan/modules/mail/SmtpCon.java
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
diff -r aa8517d7c065 -r 23e8f93055a4 src/luan/modules/mail/SmtpCon.java
--- a/src/luan/modules/mail/SmtpCon.java	Thu Aug 30 10:58:19 2018 -0600
+++ b/src/luan/modules/mail/SmtpCon.java	Sun Sep 02 08:33:54 2018 -0600
@@ -11,6 +11,7 @@
 import javax.mail.Message;
 import javax.mail.MessagingException;
 import javax.mail.Part;
+import javax.mail.internet.InternetAddress;
 import javax.mail.internet.MimeMessage;
 import javax.mail.internet.MimeMultipart;
 import javax.mail.internet.MimeBodyPart;
@@ -91,6 +92,10 @@
 			if( to != null )
 				msg.setRecipients(Message.RecipientType.TO,to);
 
+			String replyTo = getString(mailParams,"reply-to");
+			if( replyTo != null )
+				msg.setReplyTo(InternetAddress.parse(replyTo));
+
 			String cc = getString(mailParams,"cc");
 			if( cc != null )
 				msg.setRecipients(Message.RecipientType.CC,cc);