diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-09-16 18:55:04 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-09-16 18:55:04 +0000 |
| commit | 0167da10ca996d175032cec68c0490e263beb382 (patch) | |
| tree | 1429a91c8d739f9b5bfaf0460f8fe220fccd7b27 /roundcubemail/program/steps/mail | |
| parent | 4c49509b059a499cec0d5c824da1793102d4296f (diff) | |
- Added Reply-To to forwarded emails (#1485315)
git-svn-id: https://svn.roundcube.net/trunk@1808 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail')
| -rw-r--r-- | roundcubemail/program/steps/mail/compose.inc | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/roundcubemail/program/steps/mail/compose.inc b/roundcubemail/program/steps/mail/compose.inc index 151b46146..7995b34bf 100644 --- a/roundcubemail/program/steps/mail/compose.inc +++ b/roundcubemail/program/steps/mail/compose.inc @@ -543,11 +543,14 @@ function rcmail_create_forward_body($body, $bodyIsHtml) if (!$bodyIsHtml) { - $prefix = sprintf("\n\n\n-------- Original Message --------\nSubject: %s\nDate: %s\nFrom: %s\nTo: %s\n\n", - $MESSAGE->subject, - $MESSAGE->headers->date, - $MESSAGE->get_header('from'), - $MESSAGE->get_header('to')); + $prefix = "\n\n\n-------- Original Message --------\n"; + $prefix .= 'Subject: ' . $MESSAGE->subject . "\n"; + $prefix .= 'Date: ' . $MESSAGE->headers->date . "\n"; + $prefix .= 'From: ' . $MESSAGE->get_header('from') . "\n"; + $prefix .= 'To: ' . $MESSAGE->get_header('to') . "\n"; + if ($MESSAGE->headers->replyto && $MESSAGE->headers->replyto != $MESSAGE->headers->from) + $prefix .= 'Reply-To: ' . $MESSAGE->get_header('replyto') . "\n"; + $prefix .= "\n"; } else { @@ -557,12 +560,17 @@ function rcmail_create_forward_body($body, $bodyIsHtml) "<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">Subject: </th><td>%s</td></tr>" . "<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">Date: </th><td>%s</td></tr>" . "<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">From: </th><td>%s</td></tr>" . - "<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">To: </th><td>%s</td></tr>" . - "</tbody></table><br>", + "<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">To: </th><td>%s</td></tr>", Q($MESSAGE->subject), Q($MESSAGE->headers->date), htmlspecialchars(Q($MESSAGE->get_header('from'), 'replace'), ENT_COMPAT, $OUTPUT->get_charset(), true), - htmlspecialchars(Q($MESSAGE->get_header('to'), 'replace'), ENT_COMPAT, $OUTPUT->get_charset(), true)); + htmlspecialchars(Q($MESSAGE->get_header('to'), 'replace'), ENT_COMPAT, $OUTPUT->get_charset(), true)); + + if ($MESSAGE->headers->replyto && $MESSAGE->headers->replyto != $MESSAGE->headers->from) + $prefix .= sprintf("<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">Reply-To: </th><td>%s</td></tr>", + htmlspecialchars(Q($MESSAGE->get_header('replyto'), 'replace'), ENT_COMPAT, $OUTPUT->get_charset(), true)); + + $prefix .= "</tbody></table><br>"; } // add attachments |
