aboutsummaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-10-15 15:43:41 -0700
committerJunio C Hamano <gitster@pobox.com>2015-10-15 15:43:41 -0700
commit50a5e697b47a8625ed5b4d8a7f475a5741555566 (patch)
tree9869307c4e37816e1de493c83a2695e77026dcac /git-send-email.perl
parent51a0908a6f3e996051b5df076cd20e8bd9712333 (diff)
parentf60c483d1d135a1f5f7c6067198a6207f1e59dc6 (diff)
downloadgit-50a5e697b47a8625ed5b4d8a7f475a5741555566.tar.gz
git-50a5e697b47a8625ed5b4d8a7f475a5741555566.tar.xz
Merge branch 'sa/send-email-smtp-batch-data-limit'
When "git send-email" wanted to talk over Net::SMTP::SSL, Net::Cmd::datasend() did not like to be fed too many bytes at the same time and failed to send messages. Send the payload one line at a time to work around the problem. * sa/send-email-smtp-batch-data-limit: git-send-email.perl: Fixed sending of many/huge changes/patches
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl6
1 files changed, 5 insertions, 1 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index e3ff44b4d..e907e0eac 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -1365,7 +1365,11 @@ Message-Id: $message_id
$smtp->mail( $raw_from ) or die $smtp->message;
$smtp->to( @recipients ) or die $smtp->message;
$smtp->data or die $smtp->message;
- $smtp->datasend("$header\n$message") or die $smtp->message;
+ $smtp->datasend("$header\n") or die $smtp->message;
+ my @lines = split /^/, $message;
+ foreach my $line (@lines) {
+ $smtp->datasend("$line") or die $smtp->message;
+ }
$smtp->dataend() or die $smtp->message;
$smtp->code =~ /250|200/ or die "Failed to send $subject\n".$smtp->message;
}