* doc/misc/smtpmail.texi (Server workarounds): Mention it (bug#34177).
* lisp/mail/smtpmail.el (smtpmail-retries): New variable.
(smtpmail-via-smtp): Use it.
@table @code
+@item smtpmail-retries
+@vindex smtpmail-retries
+An SMTP server may return an error code saying that there's a
+transient error (a @samp{4xx} code). In that case, smtpmail will try
+to resend the message automatically, and the number of times it tries
+before giving up is determined by this variable, which defaults to 10.
+
@item smtpmail-local-domain
@vindex smtpmail-local-domain
The variable @code{smtpmail-local-domain} controls the hostname sent
---
*** smtpmail will now try resending mail when getting a transient 4xx
-error message from the SMTP server.
+error message from the SMTP server. The new 'smtpmail-retries'
+variable says how many times to retry.
** Footnote mode
: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.
)
((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