emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 726b758: Allow direct choice of smtp authentication method


From: Andrew G Cohen
Subject: master 726b758: Allow direct choice of smtp authentication method
Date: Sat, 29 Aug 2020 00:30:10 -0400 (EDT)

branch: master
commit 726b758005ead50e9c98ef50a59304646652b994
Author: Andrew G Cohen <cohen@andy.bu.edu>
Commit: Andrew G Cohen <cohen@andy.bu.edu>

    Allow direct choice of smtp authentication method
    
    * lisp/mail/smtpmail.el (smtpmail-try-auth-methods): Let the
    authorization credentials have an entry with key :smtp-auth containing
    a preferred authentication mechanism.
---
 lisp/mail/smtpmail.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 666395e..1786608 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -512,8 +512,9 @@ for `smtpmail-try-auth-method'.")
        (if port
            (format "%s" port)
          "smtp"))
-  (let* ((mechs (cdr-safe (assoc 'auth supported-extensions)))
-        (mech (car (smtpmail-intersection mechs smtpmail-auth-supported)))
+  (let* ((mechs (smtpmail-intersection
+                 (cdr-safe (assoc 'auth supported-extensions))
+                 smtpmail-auth-supported))
         (auth-source-creation-prompts
           '((user  . "SMTP user name for %h: ")
             (secret . "SMTP password for %u@%h: ")))
@@ -526,6 +527,7 @@ for `smtpmail-try-auth-method'.")
                      :require (and ask-for-password
                                    '(:user :secret))
                      :create ask-for-password)))
+         (mech (or (plist-get auth-info :smtp-auth) (car mechs)))
          (user (plist-get auth-info :user))
          (password (plist-get auth-info :secret))
         (save-function (and ask-for-password



reply via email to

[Prev in Thread] Current Thread [Next in Thread]