aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorSimon Josefsson <[email protected]>2009-03-03 16:28:17 +0000
committerSimon Josefsson <[email protected]>2009-03-03 16:28:17 +0000
commit9927d25059bbe990605a4e6bf8ad74946b0d575a (patch)
treeeaea5f5ec1a57ec1db68accc8f99aa1e150ff948 /lisp
parent7bbab3e051d1d5911332ba4314aa2830c8d7af55 (diff)
(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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/mail/smtpmail.el5
2 files changed, 11 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index eecf3ea0a6..8944b03af0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
+2009-03-03 Simon Josefsson <[email protected]>
+
+ * 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 <[email protected]>
* emacs-lisp/lisp.el (end-of-defun-function): Make it more clear that
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 76c6d42b6d..c849c7e9a6 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -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