(require 'pcustom)
(require 'mail-utils) ; mail-strip-quoted-names
+(eval-when-compile (require 'sasl))
(eval-and-compile
(autoload 'starttls-open-stream "starttls")
(autoload 'starttls-negotiate "starttls")
(autoload 'sasl-plain "sasl")
(autoload 'sasl-scram-md5-client-msg-1 "sasl")
(autoload 'sasl-scram-md5-client-msg-2 "sasl")
- (autoload 'sasl-scram-md5-authenticate-server "sasl"))
+ (autoload 'sasl-scram-md5-authenticate-server "sasl")
+ (autoload 'sasl-digest-md5-digest-response "sasl"))
(eval-when-compile (require 'cl)) ; push
"*SMTP connection type."
:type '(choice (const nil) (const :tag "TLS" starttls))
:group 'smtp)
-
+
(defvar smtp-read-point nil)
(defun smtp-make-fqdn ()
;; AUTH --- SMTP Service Extension for Authentication (RFC2554)
(when smtp-authenticate-type
- (let ((auth (intern smtp-authenticate-type)) method)
+ (let ((auth smtp-authenticate-type) method)
(if (and
(memq auth extensions)
(setq method (nth 1 (assq auth smtp-authenticate-method-alist))))
(funcall method process)
- (throw 'smtp-error
+ (throw 'done
(format "AUTH mechanism %s not available" auth)))))
;; ONEX --- One message transaction only (sendmail extension?)
t)
(if (and process
- (eq (process-status process) 'open))
+ (memq (process-status process) '(open run)))
(progn
;; QUIT
(smtp-send-command process "QUIT")
(defun smtp-auth-digest-md5 (process)
"Login to server using the AUTH DIGEST-MD5 method."
- (let (user realm responce)
+ (let (user realm response)
(smtp-send-command process "AUTH DIGEST-MD5")
(setq response (smtp-read-response process))
(if (or (null (car response))
user
smtp-authenticate-passphrase
"smtp" smtp-server realm)
- 'no-line-break))
+ 'no-line-break) t)
(setq response (smtp-read-response process))
(if (or (null (car response))
(not (integerp (car response)))