[PATCH 1/4] send-email: actually add bcc headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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@xxxxxxxxxxx,
 	A <author@xxxxxxxxxxx>,
 	One <one@xxxxxxxxxxx>,
 	two@xxxxxxxxxxx
+Bcc: bcc@xxxxxxxxxxx
 Subject: [PATCH 1/1] Second.
 Date: DATE-STRING
 Message-Id: MESSAGE-ID-STRING
-- 
1.7.0.1.171.geb5ee

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]