From 3ee5a7200afc62d8eda2c0ce77743af4951147a3 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Thu, 09 Dec 2010 14:10:44 -0500
Subject: [PATCH] - Improved Mail-Reply-To and Mail-Followup-To headers handling

---
 program/steps/mail/sendmail.inc |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index a796c7b..07f32b8 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -322,15 +322,16 @@
 if (!empty($identity_arr['organization']))
   $headers['Organization'] = $identity_arr['organization'];
 
-if (!empty($_POST['_replyto']))
-  $headers['Reply-To'] = rcmail_email_input_format(get_input_value('_replyto', RCUBE_INPUT_POST, TRUE, $message_charset));
+if (!empty($_POST['_replyto'])) {
+  $reply_to = rcmail_email_input_format(get_input_value('_replyto', RCUBE_INPUT_POST, TRUE, $message_charset));
+  $headers['Reply-To'] = $reply_to;
+  $headers['Mail-Reply-To'] = $reply_to;
+}
 else if (!empty($identity_arr['reply-to']))
   $headers['Reply-To'] = rcmail_email_input_format($identity_arr['reply-to'], false, true);
 
-if (!empty($_POST['_mailfollowupto']))
-  $headers['Mail-Followup-To'] = rcmail_email_input_format(get_input_value('_mailfollowupto', RCUBE_INPUT_POST, TRUE, $message_charset));
-if (!empty($_POST['_mailreplyto']))
-  $headers['Mail-Reply-To'] = rcmail_email_input_format(get_input_value('_mailreplyto', RCUBE_INPUT_POST, TRUE, $message_charset));
+if (!empty($_POST['_followupto']))
+  $headers['Mail-Followup-To'] = rcmail_email_input_format(get_input_value('_followupto', RCUBE_INPUT_POST, TRUE, $message_charset));
 
 if (!empty($_SESSION['compose']['reply_msgid']))
   $headers['In-Reply-To'] = $_SESSION['compose']['reply_msgid'];

--
Gitblit v1.9.1