diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2019-09-17 01:26:43 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2019-09-17 01:26:43 +0200 |
commit | 3a6b5e6ad0173dfe164640e8a09bf465f78836cb (patch) | |
tree | 457442f4cb840d7c556e68246d29ce8529775246 /lisp/mail | |
parent | 90ddad804a34b70af7d849f1fdd1f069a3c30f54 (diff) | |
download | emacs-3a6b5e6ad0173dfe164640e8a09bf465f78836cb.tar.gz |
Add a new variable smtpmail-retries
* doc/misc/smtpmail.texi (Server workarounds): Mention it (bug#34177).
* lisp/mail/smtpmail.el (smtpmail-retries): New variable.
(smtpmail-via-smtp): Use it.
Diffstat (limited to 'lisp/mail')
-rw-r--r-- | lisp/mail/smtpmail.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 57913c1f0f0..802c9ba788d 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -165,6 +165,13 @@ attempt." :type '(choice regexp (const :tag "None" nil)) :version "27.1") +(defcustom smtpmail-retries 10 + "The number of times smtpmail will retry sending when getting transient errors. +These are errors with a code of 4xx from the SMTP server, which +mean \"try again\"." + :type 'integer + :version "27.1") + ;; End of customizable variables. @@ -823,7 +830,7 @@ Returns an error if the server cannot be contacted." ) ((and (numberp (car result)) (<= 400 (car result) 499) - (< send-attempts 10)) + (< send-attempts smtpmail-retries)) (message "Got transient error code %s when sending; retrying attempt %d..." (car result) send-attempts) ;; Retry on getting a transient 4xx code; see |