From bde645fdf1fef55ba8da8657918363fc237fb969 Mon Sep 17 00:00:00 2001 From: thomascube Date: Sun, 5 Feb 2006 16:14:56 +0000 Subject: Added patches for BCC headers --- program/steps/mail/func.inc | 4 ++-- program/steps/mail/sendmail.inc | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'program/steps/mail') diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index d089dd272..926121dea 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -940,7 +940,7 @@ function rcmail_message_headers($attrib, $headers=NULL) $out = '\n"; // show these headers - $standard_headers = array('subject', 'from', 'organization', 'to', 'cc', 'reply-to', 'date'); + $standard_headers = array('subject', 'from', 'organization', 'to', 'cc', 'bcc', 'reply-to', 'date'); foreach ($standard_headers as $hkey) { @@ -949,7 +949,7 @@ function rcmail_message_headers($attrib, $headers=NULL) if ($hkey=='date' && !empty($headers[$hkey])) $header_value = format_date(strtotime($headers[$hkey])); - else if (in_array($hkey, array('from', 'to', 'cc', 'reply-to'))) + else if (in_array($hkey, array('from', 'to', 'cc', 'bcc', 'reply-to'))) $header_value = rep_specialchars_output(rcmail_address_string($IMAP->decode_header($headers[$hkey]), NULL, $attrib['addicon'])); else $header_value = rep_specialchars_output($IMAP->decode_header($headers[$hkey]), '', 'all'); diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index 9d9303436..0ec19a9e4 100644 --- a/program/steps/mail/sendmail.inc +++ b/program/steps/mail/sendmail.inc @@ -181,7 +181,7 @@ if (is_array($_FILES['_attachments']['tmp_name'])) // encoding settings for mail composing -$message_param = array('text_encoding' => '7bit', +$message_param = array('text_encoding' => '8bit', 'html_encoding' => 'quoted-printable', 'head_encoding' => 'quoted-printable', 'head_charset' => $message_charset, @@ -204,8 +204,12 @@ if ($CONFIG['smtp_server']) if (strlen($headers['Bcc'])) $a_recipients[] = $headers['Bcc']; + // clean Bcc from header for recipients + $send_headers = $headers; + unset($send_headers['Bcc']); + // generate message headers - $header_str = $MAIL_MIME->txtHeaders($headers); + $header_str = $MAIL_MIME->txtHeaders($send_headers); // send message $sent = smtp_mail($from, $a_recipients, $header_str, $msg_body); -- cgit v1.2.3