(smtpmail-try-auth-methods): If the user has stored a user name, then
[bpt/emacs.git] / lisp / gnus / pop3.el
index 6f12d3d..90e11b3 100644 (file)
@@ -319,6 +319,7 @@ Returns the process associated with the connection."
                (substring response (or (string-match "<" response) 0)
                           (+ 1 (or (string-match ">" response) -1)))))
        (pop3-set-process-query-on-exit-flag (car result) nil)
+       (erase-buffer)
        (car result)))))
 
 ;; Support functions
@@ -514,6 +515,8 @@ Otherwise, return the size of the message-id MSG"
   (let ((start pop3-read-point) end)
     (with-current-buffer (process-buffer process)
       (while (not (re-search-forward "^\\.\r\n" nil t))
+       (unless (memq (process-status process) '(open run))
+         (error "pop3 server closed the connection"))
        (pop3-accept-process-output process)
        (goto-char start))
       (setq pop3-read-point (point-marker))