From 5d5ac8ec033a741c6931ef874ac4c4caa0a9359c Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sun, 18 Sep 2011 09:36:20 +0200 Subject: [PATCH] (smtpmail-via-smtp): Ignore errors that arise when sending QUIT. Fixes: debbugs:9312 --- lisp/ChangeLog | 5 +++++ lisp/mail/smtpmail.el | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 74ba03e0246..cf5c9326d23 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-09-18 Lars Magne Ingebrigtsen + + * mail/smtpmail.el (smtpmail-via-smtp): Ignore errors that arise + when sending QUIT (bug#9312). + 2011-09-17 Chong Yidong * replace.el (occur-mode-map): Rebind occur-edit-mode to "e" (Bug#8463). diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 9fe19581e81..1c6f2c7b7ed 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -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 -- 2.11.4.GIT