From: Junio C Hamano Date: Mon, 19 Oct 2009 06:01:37 +0000 (-0700) Subject: Merge branch 'jp/maint-send-email-fold' X-Git-Tag: v1.6.6-rc0~112 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/ee50af1566e78354c1a2d0feea2115b99a535d9d?ds=inline;hp=-c Merge branch 'jp/maint-send-email-fold' * jp/maint-send-email-fold: git-send-email.perl: fold multiple entry "Cc:" and multiple single line "RCPT TO:"s --- ee50af1566e78354c1a2d0feea2115b99a535d9d diff --combined git-send-email.perl index f5ba4e7699,e188a89495..a0279de687 --- a/git-send-email.perl +++ b/git-send-email.perl @@@ -401,7 -401,7 +401,7 @@@ my %aliases my %parse_alias = ( # multiline formats can be supported in the future mutt => sub { my $fh = shift; while (<$fh>) { - if (/^\s*alias\s+(\S+)\s+(.*)$/) { + if (/^\s*alias\s+(?:-group\s+\S+\s+)*(\S+)\s+(.*)$/) { my ($alias, $addr) = ($1, $2); $addr =~ s/#.*$//; # mutt allows # comments # commas delimit multiple addresses @@@ -835,7 -835,7 +835,7 @@@ sub send_messag $gitversion = Git::version(); } - my $cc = join(", ", unique_email_list(@cc)); + my $cc = join(",\n\t", unique_email_list(@cc)); my $ccline = ""; if ($cc ne '') { $ccline = "\nCc: $cc"; @@@ -921,7 -921,7 +921,7 @@@ X-Mailer: git-send-email $gitversio $smtp ||= Net::SMTP->new((defined $smtp_server_port) ? "$smtp_server:$smtp_server_port" : $smtp_server); - if ($smtp_encryption eq 'tls') { + if ($smtp_encryption eq 'tls' && $smtp) { require Net::SMTP::SSL; $smtp->command('STARTTLS'); $smtp->response(); @@@ -976,7 -976,9 +976,9 @@@ if ($smtp_server !~ m#^/#) { print "Server: $smtp_server\n"; print "MAIL FROM:<$raw_from>\n"; - print "RCPT TO:".join(',',(map { "<$_>" } @recipients))."\n"; + foreach my $entry (@recipients) { + print "RCPT TO:<$entry>\n"; + } } else { print "Sendmail: $smtp_server ".join(' ',@sendmail_parameters)."\n"; }