[PATCH 1/4] send-email: actually add bcc headers
- From
Stephen Boyd <bebarino@gmail.com>
- Date
- Mar 7, 2010, 21:33 UTC
- Message-ID
- <1267997598-20815-2-git-send-email-bebarino@gmail.com>
- In-Reply-To
- <7vk4torn8j.fsf@alter.siamese.dyndns.org>
This bug looks ancient. In fact it doesn't look like --bcc ever worked even when it was introduced in 5806324 (Add support for --bcc to git-send-email., 2006-05-29).
Signed-off-by: Stephen Boyd <bebarino@gmail.com> --- git-send-email.perl | 7 ++++++- t/t9001-send-email.sh | 1 + 2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/git-send-email.perl b/git-send-email.perl index e05455f..3d9c832 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -856,11 +856,16 @@ sub send_message if ($cc ne '') { $ccline = "\nCc: $cc"; } + my $bcc = join(",\n\t", unique_email_list(@bcclist)); + my $bccline = ""; + if ($bcc ne '') { + $bccline = "\nBcc: $bcc"; + } my $sanitized_sender = sanitize_address($sender); make_message_id() unless defined($message_id); my $header = "From: $sanitized_sender -To: $to${ccline} +To: $to${ccline}${bccline} Subject: $subject Date: $date Message-Id: $message_id diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index c09f375..db91721 100755 --- a/t/t9001-send-email.sh +++ b/t/t9001-send-email.sh @@ -149,6 +149,7 @@ Cc: cc@example.com, A <author@example.com>, One <one@example.com>, two@example.com +Bcc: bcc@example.com Subject: [PATCH 1/1] Second. Date: DATE-STRING Message-Id: MESSAGE-ID-STRING
-- 1.7.0.1.171.geb5ee