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>
This commit is contained in:

committed by
Junio C Hamano

parent
1cd749cc07
commit
02461e0e28
@ -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";
|
||||
}
|
||||
|
Reference in New Issue
Block a user