From b5c413a4cf6661c9d0363eb97748144d6fab2a06 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Wed, 28 Aug 2013 13:06:51 +0200 Subject: Fix lack of Reply-To address in header of forwarded message body (#1489298) --- program/steps/mail/compose.inc | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'program') diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 9dadfe4ad..e0b808e62 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -947,10 +947,10 @@ function rcmail_create_forward_body($body, $bodyIsHtml) $prefix .= rcube_label('from') . ': ' . $MESSAGE->get_header('from') . "\n"; $prefix .= rcube_label('to') . ': ' . $MESSAGE->get_header('to') . "\n"; - if ($MESSAGE->headers->cc) - $prefix .= rcube_label('cc') . ': ' . $MESSAGE->get_header('cc') . "\n"; - if ($MESSAGE->headers->replyto && $MESSAGE->headers->replyto != $MESSAGE->headers->from) - $prefix .= rcube_label('replyto') . ': ' . $MESSAGE->get_header('replyto') . "\n"; + if ($cc = $MESSAGE->headers->get('cc')) + $prefix .= rcube_label('cc') . ': ' . $cc . "\n"; + if (($replyto = $MESSAGE->headers->get('reply-to')) && $replyto != $MESSAGE->get_header('from')) + $prefix .= rcube_label('replyto') . ': ' . $replyto . "\n"; $prefix .= "\n"; $body = trim($body, "\r\n"); @@ -973,15 +973,13 @@ function rcmail_create_forward_body($body, $bodyIsHtml) rcube_label('from'), Q($MESSAGE->get_header('from'), 'replace'), rcube_label('to'), Q($MESSAGE->get_header('to'), 'replace')); - if ($MESSAGE->headers->cc) + if ($cc = $MESSAGE->headers->get('cc')) $prefix .= sprintf("%s: %s", - rcube_label('cc'), - Q($MESSAGE->get_header('cc'), 'replace')); + rcube_label('cc'), Q($cc, 'replace')); - if ($MESSAGE->headers->replyto && $MESSAGE->headers->replyto != $MESSAGE->headers->from) + if (($replyto = $MESSAGE->headers->get('reply-to')) && $replyto != $MESSAGE->get_header('from')) $prefix .= sprintf("%s: %s", - rcube_label('replyto'), - Q($MESSAGE->get_header('replyto'), 'replace')); + rcube_label('replyto'), Q($replyto, 'replace')); $prefix .= "
"; } -- cgit v1.2.3