summaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2009-10-08 10:03:26 -0700
committerJunio C Hamano <gitster@pobox.com>2009-10-09 17:02:21 -0700
commit02461e0e2833753151ed71899f075c94e5fc495b (patch)
tree21e38c24e55b2ae8abf1d8c453affe92546dd56a /git-send-email.perl
parent1cd749cc0722533bd1849f491ec9ab19e17232e1 (diff)
downloadgit-02461e0e2833753151ed71899f075c94e5fc495b.tar.gz
git-send-email.perl: fold multiple entry "Cc:" and multiple single line "RCPT TO:"s
Some MTAs reject Cc: lines longer than 78 chars. Avoid this by using the same join as "To:" ",\n\t" so each subsequent Cc entry is on a new line. RCPT TO: should have a single entry per line. see: http://www.ietf.org/rfc/rfc2821.txt Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl6
1 files changed, 4 insertions, 2 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 0700d80afc..e188a89495 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -835,7 +835,7 @@ sub send_message
$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";
@@ -976,7 +976,9 @@ X-Mailer: git-send-email $gitversion
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";
}