]> git.eshelyaron.com Git - emacs.git/commitdiff
(smtpmail-auth-supported): Mention that list is
authorSimon Josefsson <jas@extundo.com>
Tue, 3 Mar 2009 16:28:17 +0000 (16:28 +0000)
committerSimon Josefsson <jas@extundo.com>
Tue, 3 Mar 2009 16:28:17 +0000 (16:28 +0000)
in preference order.
(smtpmail-try-auth-methods): Improve which authentication
mechanism to use, so that the locally most preferred and mutually
supported mechanism is used.

lisp/ChangeLog
lisp/mail/smtpmail.el

index eecf3ea0a6601e879604792f0fb939651923f6d9..8944b03af035b9012c474d84ad704fd75aa70627 100644 (file)
@@ -1,3 +1,11 @@
+2009-03-03  Simon Josefsson  <simon@josefsson.org>
+
+       * mail/smtpmail.el (smtpmail-auth-supported): Mention that list is
+       in preference order.
+       (smtpmail-try-auth-methods): Improve which authentication
+       mechanism to use, so that the locally most preferred and mutually
+       supported mechanism is used.
+
 2009-03-03  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/lisp.el (end-of-defun-function): Make it more clear that
index 76c6d42b6dc85f8a8f908d0c574e4f52e8cb3448..c849c7e9a6991b26db55ae3e9cf03996ac220854 100644 (file)
@@ -218,7 +218,8 @@ This is relative to `smtpmail-queue-dir'."
 (defvar smtpmail-read-point)
 
 (defconst smtpmail-auth-supported '(cram-md5 plain login)
-  "List of supported SMTP AUTH mechanisms.")
+  "List of supported SMTP AUTH mechanisms.
+The list is in preference order.")
 
 (defvar smtpmail-mail-address nil
   "Value to use for envelope-from address for mail from ambient buffer.")
@@ -534,7 +535,7 @@ This is relative to `smtpmail-queue-dir'."
 
 (defun smtpmail-try-auth-methods (process supported-extensions host port)
   (let* ((mechs (cdr-safe (assoc 'auth supported-extensions)))
-        (mech (car (smtpmail-intersection smtpmail-auth-supported mechs)))
+        (mech (car (smtpmail-intersection mechs smtpmail-auth-supported)))
         (auth-user (auth-source-user-or-password
                     "login" host (or port "smtp")))
         (auth-pass (auth-source-user-or-password