1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-16 02:50:26 -08:00

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.
This commit is contained in:
Lars Magne Ingebrigtsen 2011-08-21 06:11:59 +02:00
parent 39eeb2f7c5
commit f5e3c5984b
2 changed files with 12 additions and 0 deletions

View file

@ -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> 2011-08-21 Chong Yidong <cyd@stupidchicken.com>
* font-lock.el (font-lock-fontify-region) * font-lock.el (font-lock-fontify-region)

View file

@ -86,6 +86,11 @@ The default value would be \"smtp\" or 25."
:type '(choice (integer :tag "Port") (string :tag "Service")) :type '(choice (integer :tag "Port") (string :tag "Service"))
:group 'smtpmail) :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 (defcustom smtpmail-local-domain nil
"Local domain name without a host name. "Local domain name without a host name.
If the function `system-name' returns the full internet address, If the function `system-name' returns the full internet address,
@ -490,6 +495,7 @@ The list is in preference order.")
(auth-source-search (auth-source-search
:host host :host host
:port port :port port
:user smtpmail-smtp-user
:max 1 :max 1
:require (and ask-for-password :require (and ask-for-password
'(:user :secret)) '(:user :secret))
@ -510,6 +516,7 @@ The list is in preference order.")
:max 1 :max 1
:host host :host host
:port port :port port
:user smtpmail-smtp-user
:require '(:user :secret) :require '(:user :secret)
:create t)) :create t))
password (plist-get auth-info :secret))) password (plist-get auth-info :secret)))