[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 3a6b5e6: Add a new variable smtpmail-retries
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master 3a6b5e6: Add a new variable smtpmail-retries |
Date: |
Mon, 16 Sep 2019 19:26:52 -0400 (EDT) |
branch: master
commit 3a6b5e6ad0173dfe164640e8a09bf465f78836cb
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
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.
---
doc/misc/smtpmail.texi | 7 +++++++
etc/NEWS | 3 ++-
lisp/mail/smtpmail.el | 9 ++++++++-
3 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/doc/misc/smtpmail.texi b/doc/misc/smtpmail.texi
index b2fc90a..7fa7b24 100644
--- a/doc/misc/smtpmail.texi
+++ b/doc/misc/smtpmail.texi
@@ -372,6 +372,13 @@ implement support for common requirements.
@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
diff --git a/etc/NEWS b/etc/NEWS
index adb2b64..33a7d12 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1164,7 +1164,8 @@ attempt when communicating with the SMTP server(s), the
---
*** 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
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 57913c1..802c9ba 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 3a6b5e6: Add a new variable smtpmail-retries,
Lars Ingebrigtsen <=