From a0bc327491486e63ff7d0cfdc59380645152e69a Mon Sep 17 00:00:00 2001 From: simond Date: Wed, 20 Mar 2002 09:39:52 +0000 Subject: [PATCH] Include Cc in forwarded message, with option to toggle behaviour git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2612 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/compose.php | 10 +++++++++- src/load_prefs.php | 2 ++ src/options_display.php | 7 +++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/compose.php b/src/compose.php index 2fc3ed79..de502179 100644 --- a/src/compose.php +++ b/src/compose.php @@ -322,7 +322,7 @@ exit(); function newMail () { global $forward_id, $imapConnection, $msg, $ent_num, $body_ary, $body, $reply_id, $send_to, $send_to_cc, $mailbox, $send_to_bcc, $editor_size, - $draft_id, $use_signature, $composesession; + $draft_id, $use_signature, $composesession, $forward_cc; $send_to = decodeHeader($send_to, false); $send_to_cc = decodeHeader($send_to_cc, false); @@ -399,6 +399,14 @@ function newMail () { $bodyTop .= ' ' . $orig_header->to[$x] . "\n"; } } + if (isset($forward_cc) && $forward_cc) { + $bodyTop .= _("Cc") . ': ' . $orig_header->cc[0] . "\n"; + if (count($orig_header->cc) > 1) { + for ($x = 1; $x < count($orig_header->cc); $x++) { + $bodyTop .= ' ' . $orig_header->cc[$x] . "\n"; + } + } + } $bodyTop .= "\n"; $body = $bodyTop . $body; } diff --git a/src/load_prefs.php b/src/load_prefs.php index 652bc192..880b1a2e 100644 --- a/src/load_prefs.php +++ b/src/load_prefs.php @@ -225,6 +225,8 @@ $javascript_on = getPref($data_dir, $username, 'javascript_on', SMPREF_ON); $search_memory = getPref($data_dir, $username, 'search_memory', 0); +$forward_cc = getPref($data_dir, $username, 'forward_cc', 0); + do_hook('loading_prefs'); ?> diff --git a/src/options_display.php b/src/options_display.php index 9cc1027e..ef52091b 100644 --- a/src/options_display.php +++ b/src/options_display.php @@ -200,6 +200,13 @@ function load_optpage_data_display() { 'refresh' => SMOPT_REFRESH_NONE ); + $optvals[SMOPT_GRP_MESSAGE][] = array( + 'name' => 'forward_cc', + 'caption' => _("Include CCs when forwarding messages"), + 'type' => SMOPT_TYPE_BOOLEAN, + 'refresh' => SMOPT_REFRESH_NONE + ); + $optvals[SMOPT_GRP_MESSAGE][] = array( 'name' => 'show_xmailer_default', 'caption' => _("Enable Mailer Display"), -- 2.25.1