mirror of
https://github.com/git/git.git
synced 2024-11-24 02:17:02 +08:00
Merge branch 'sa/send-email-smtp-batch-data-limit' into maint
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
This commit is contained in:
commit
53be145209
@ -1365,7 +1365,11 @@ Message-Id: $message_id
|
|||||||
$smtp->mail( $raw_from ) or die $smtp->message;
|
$smtp->mail( $raw_from ) or die $smtp->message;
|
||||||
$smtp->to( @recipients ) or die $smtp->message;
|
$smtp->to( @recipients ) or die $smtp->message;
|
||||||
$smtp->data 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->dataend() or die $smtp->message;
|
||||||
$smtp->code =~ /250|200/ or die "Failed to send $subject\n".$smtp->message;
|
$smtp->code =~ /250|200/ or die "Failed to send $subject\n".$smtp->message;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user