summaryrefslogtreecommitdiff
path: root/lisp/mail
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <larsi@gnus.org>2011-08-21 06:11:59 +0200
committerLars Magne Ingebrigtsen <larsi@gnus.org>2011-08-21 06:11:59 +0200
commitf5e3c5984b072553838cb15dfd4ab94a9f6ac436 (patch)
tree527c82530a68f384222fc095a8cbd01a768c97c3 /lisp/mail
parent39eeb2f7c5fa7ff0b2a02e84a60d57990b19fbac (diff)
downloademacs-f5e3c5984b072553838cb15dfd4ab94a9f6ac436.tar.gz
emacs-f5e3c5984b072553838cb15dfd4ab94a9f6ac436.tar.bz2
emacs-f5e3c5984b072553838cb15dfd4ab94a9f6ac436.zip
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.
Diffstat (limited to 'lisp/mail')
-rw-r--r--lisp/mail/smtpmail.el7
1 files changed, 7 insertions, 0 deletions
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)))