From d11c943c7824ed91ec396c8726d18ce687848d34 Mon Sep 17 00:00:00 2001 From: Christian Ludwig Date: Sun, 4 Mar 2018 00:58:14 +0100 Subject: send-email: support separate Reply-To address In some projects contributions from groups are only accepted from a common group email address. But every individual may want to receive replies to her own personal address. That's what we have 'Reply-To' headers for in SMTP. So introduce an optional '--reply-to' command line option. This patch re-uses the $reply_to variable. This could break out-of-tree patches! Signed-off-by: Christian Ludwig Signed-off-by: Junio C Hamano --- git-send-email.perl | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'git-send-email.perl') diff --git a/git-send-email.perl b/git-send-email.perl index 36a0774c2d..0aaf1dcbc6 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -56,6 +56,7 @@ git send-email --dump-aliases --[no-]cc * Email Cc: --[no-]bcc * Email Bcc: --subject * Email "Subject:" + --reply-to * Email "Reply-To:" --in-reply-to * Email "In-Reply-To:" --[no-]xmailer * Add "X-Mailer:" header (default). --[no-]annotate * Review each patch that will be sent in an editor. @@ -166,7 +167,7 @@ my $re_encoded_word = qr/=\?($re_token)\?($re_token)\?($re_encoded_text)\?=/; # Variables we fill in automatically, or via prompting: my (@to,$no_to,@initial_to,@cc,$no_cc,@initial_cc,@bcclist,$no_bcc,@xh, - $initial_in_reply_to,$initial_subject,@files, + $initial_in_reply_to,$reply_to,$initial_subject,@files, $author,$sender,$smtp_authpass,$annotate,$use_xmailer,$compose,$time); my $envelope_sender; @@ -315,6 +316,7 @@ die __("--dump-aliases incompatible with other options\n") $rc = GetOptions( "sender|from=s" => \$sender, "in-reply-to=s" => \$initial_in_reply_to, + "reply-to=s" => \$reply_to, "subject=s" => \$initial_subject, "to=s" => \@initial_to, "to-cmd=s" => \$to_cmd, @@ -677,6 +679,7 @@ if ($compose) { my $tpl_sender = $sender || $repoauthor || $repocommitter || ''; my $tpl_subject = $initial_subject || ''; my $tpl_in_reply_to = $initial_in_reply_to || ''; + my $tpl_reply_to = $reply_to || ''; print $c <