:always-query-capabilities t
:starttls-function
(lambda (capabilities)
- (and (string-match "-STARTTLS" capabilities)
+ (and (string-match "[ -]STARTTLS" capabilities)
"STARTTLS\r\n"))
:client-certificate t
:use-starttls-if-possible t)))
(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
(defun smtpmail-process-filter (process output)
(with-current-buffer (process-buffer process)
(goto-char (point-max))
- (insert output)))
+ (insert output)
+ (set-marker (process-mark process) (point))))
(defun smtpmail-read-response (process)
(let ((case-fold-search nil)