summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mail/smtpmail.el9
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