From 5453b83bdf92efbfe9e9aaa54d4c62ce48ced2f5 Mon Sep 17 00:00:00 2001 From: xiaoqiang zhao Date: Sun, 21 May 2017 20:59:50 +0800 Subject: send-email: --batch-size to work around some SMTP server limit Some email servers (e.g. smtp.163.com) limit the number emails to be sent per session (connection) and this will lead to a faliure when sending many messages. Teach send-email to disconnect after sending a number of messages (configurable via the --batch-size= option), wait for a few seconds (configurable via the --relogin-delay= option) and reconnect, to work around such a limit. Also add two configuration variables to give these options the default. Note: We will use this as a band-aid for now, but in the longer term, we should look at and react to the SMTP error code from the server; Xianqiang reports that 450 and 451 are returned by problematic servers. cf. https://public-inbox.org/git/7993e188.d18d.15c3560bcaf.Coremail.zxq_yx_007@163.com/ Signed-off-by: xiaoqiang zhao Signed-off-by: Junio C Hamano --- contrib/completion/git-completion.bash | 2 ++ 1 file changed, 2 insertions(+) (limited to 'contrib') diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index af658995d5..29496353a4 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -2608,6 +2608,8 @@ _git_config () sendemail.thread sendemail.to sendemail.validate + sendemail.smtpbatchsize + sendemail.smtprelogindelay showbranch.default status.relativePaths status.showUntrackedFiles -- cgit v1.2.3