From f5e3c5984b072553838cb15dfd4ab94a9f6ac436 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sun, 21 Aug 2011 06:11:59 +0200 Subject: [PATCH] Introduce a new variable to allow controlling the SMTP user name * mail/smtpmail.el (smtpmail-smtp-user): New variable. (smtpmail-try-auth-methods): Use it. --- lisp/ChangeLog | 5 +++++ lisp/mail/smtpmail.el | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index edb2fc2cd9f..e383f86971f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-08-21 Lars Magne Ingebrigtsen + + * mail/smtpmail.el (smtpmail-smtp-user): New variable. + (smtpmail-try-auth-methods): Use it. + 2011-08-21 Chong Yidong * font-lock.el (font-lock-fontify-region) diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 637d10135fa..caec69e7e9e 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -86,6 +86,11 @@ The default value would be \"smtp\" or 25." :type '(choice (integer :tag "Port") (string :tag "Service")) :group 'smtpmail) +(defcustom smtpmail-smtp-user nil + "User name to use when looking up credentials." + :type '(choice (const nil) string) + :group 'smtpmail) + (defcustom smtpmail-local-domain nil "Local domain name without a host name. If the function `system-name' returns the full internet address, @@ -490,6 +495,7 @@ The list is in preference order.") (auth-source-search :host host :port port + :user smtpmail-smtp-user :max 1 :require (and ask-for-password '(:user :secret)) @@ -510,6 +516,7 @@ The list is in preference order.") :max 1 :host host :port port + :user smtpmail-smtp-user :require '(:user :secret) :create t)) password (plist-get auth-info :secret))) -- 2.39.2