summaryrefslogtreecommitdiff
path: root/lisp
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
parent39eeb2f7c5fa7ff0b2a02e84a60d57990b19fbac (diff)
downloademacs-f5e3c5984b072553838cb15dfd4ab94a9f6ac436.tar.gz
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')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/mail/smtpmail.el7
2 files changed, 12 insertions, 0 deletions
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 <larsi@gnus.org>
+
+ * mail/smtpmail.el (smtpmail-smtp-user): New variable.
+ (smtpmail-try-auth-methods): Use it.
+
2011-08-21 Chong Yidong <cyd@stupidchicken.com>
* 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)))