diff options
author | Sam Steingold <sds@gnu.org> | 2004-02-04 15:35:11 +0000 |
---|---|---|
committer | Sam Steingold <sds@gnu.org> | 2004-02-04 15:35:11 +0000 |
commit | dbfa9ed49fe7fbe53fd45df861e7a86f171bf2fd (patch) | |
tree | 63017b1b6ffc019774e1402688619cd4e642a5f3 /lisp/mail | |
parent | 12ad758a6624a5068ae0a19687d8e155c5f73a45 (diff) | |
download | emacs-dbfa9ed49fe7fbe53fd45df861e7a86f171bf2fd.tar.gz |
(smtpmail-try-auth-methods): Pass port-name as defaultport to `netrc-machine'.
Do not try authentication when no mechanism is available.
Diffstat (limited to 'lisp/mail')
-rw-r--r-- | lisp/mail/smtpmail.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index bd9d5d7dd39..1730d131f60 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -488,15 +488,15 @@ This is relative to `smtpmail-queue-dir'.") (mech (car (smtpmail-intersection smtpmail-auth-supported mechs))) (cred (if (stringp smtpmail-auth-credentials) (let* ((netrc (netrc-parse smtpmail-auth-credentials)) - (hostentry (netrc-machine - netrc host (format "%s" (or port "smtp")) - "smtp"))) + (port-name (format "%s" (or port "smtp"))) + (hostentry (netrc-machine netrc host port-name + port-name))) (when hostentry (list host port (netrc-get hostentry "login") (netrc-get hostentry "password")))) (smtpmail-find-credentials - smtpmail-auth-credentials host port))) + smtpmail-auth-credentiaals host port))) (passwd (when cred (or (smtpmail-cred-passwd cred) (read-passwd @@ -504,7 +504,7 @@ This is relative to `smtpmail-queue-dir'.") (smtpmail-cred-server cred) (smtpmail-cred-port cred)))))) ret) - (when cred + (when (and cred mech) (cond ((eq mech 'cram-md5) (smtpmail-send-command process (format "AUTH %s" mech)) |