]> git.eshelyaron.com Git - emacs.git/commitdiff
(smtpmail-via-smtp): Ignore errors that arise when sending QUIT.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 18 Sep 2011 07:36:20 +0000 (09:36 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 18 Sep 2011 07:36:20 +0000 (09:36 +0200)
Fixes: debbugs:9312
lisp/ChangeLog
lisp/mail/smtpmail.el

index 74ba03e02461ab37253381ee542d6073818fdc92..cf5c9326d2309ea42802341b2770a1de35dd5d99 100644 (file)
@@ -1,3 +1,8 @@
+2011-09-18  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * mail/smtpmail.el (smtpmail-via-smtp): Ignore errors that arise
+       when sending QUIT (bug#9312).
+
 2011-09-17  Chong Yidong  <cyd@stupidchicken.com>
 
        * replace.el (occur-mode-map): Rebind occur-edit-mode to "e" (Bug#8463).
index 9fe19581e81cf1f5bed55e1011e6340ae1ae799a..1c6f2c7b7ed33aa8ca8d9d8c4d6003860282b69c 100644 (file)
@@ -773,8 +773,12 @@ The list is in preference order.")
                     (eq (car result) 530))
                ;; We got a "530 auth required", so we close and try
                ;; again, this time asking the user for a password.
-               (smtpmail-send-command process "QUIT")
-               (smtpmail-read-response process)
+               ;; We ignore any errors here, because some MTAs just
+               ;; close the connection immediately after giving the
+               ;; error message.
+               (ignore-errors
+                 (smtpmail-send-command process "QUIT")
+                 (smtpmail-read-response process))
                (delete-process process)
                (setq process nil)
                (throw 'done