diff options
| author | Sam Steingold | 2004-02-04 15:35:11 +0000 |
|---|---|---|
| committer | Sam Steingold | 2004-02-04 15:35:11 +0000 |
| commit | dbfa9ed49fe7fbe53fd45df861e7a86f171bf2fd (patch) | |
| tree | 63017b1b6ffc019774e1402688619cd4e642a5f3 | |
| parent | 12ad758a6624a5068ae0a19687d8e155c5f73a45 (diff) | |
| download | emacs-dbfa9ed49fe7fbe53fd45df861e7a86f171bf2fd.tar.gz emacs-dbfa9ed49fe7fbe53fd45df861e7a86f171bf2fd.zip | |
(smtpmail-try-auth-methods): Pass port-name as defaultport to `netrc-machine'.
Do not try authentication when no mechanism is available.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/mail/smtpmail.el | 10 |
2 files changed, 11 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bf8051e7c76..95a92f77e9f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2004-02-04 Sam Steingold <sds@gnu.org> | ||
| 2 | |||
| 3 | * mail/smtpmail.el (smtpmail-try-auth-methods): | ||
| 4 | Do not try authentication when no mechanism is available. | ||
| 5 | Pass port-name as defaultport to `netrc-machine'. | ||
| 6 | |||
| 1 | 2004-02-04 Stephen Eglen <stephen@gnu.org> | 7 | 2004-02-04 Stephen Eglen <stephen@gnu.org> |
| 2 | 8 | ||
| 3 | * iswitchb.el (iswitchb-minibuffer-setup-hook): Update doc string | 9 | * iswitchb.el (iswitchb-minibuffer-setup-hook): Update doc string |
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'.") | |||
| 488 | (mech (car (smtpmail-intersection smtpmail-auth-supported mechs))) | 488 | (mech (car (smtpmail-intersection smtpmail-auth-supported mechs))) |
| 489 | (cred (if (stringp smtpmail-auth-credentials) | 489 | (cred (if (stringp smtpmail-auth-credentials) |
| 490 | (let* ((netrc (netrc-parse smtpmail-auth-credentials)) | 490 | (let* ((netrc (netrc-parse smtpmail-auth-credentials)) |
| 491 | (hostentry (netrc-machine | 491 | (port-name (format "%s" (or port "smtp"))) |
| 492 | netrc host (format "%s" (or port "smtp")) | 492 | (hostentry (netrc-machine netrc host port-name |
| 493 | "smtp"))) | 493 | port-name))) |
| 494 | (when hostentry | 494 | (when hostentry |
| 495 | (list host port | 495 | (list host port |
| 496 | (netrc-get hostentry "login") | 496 | (netrc-get hostentry "login") |
| 497 | (netrc-get hostentry "password")))) | 497 | (netrc-get hostentry "password")))) |
| 498 | (smtpmail-find-credentials | 498 | (smtpmail-find-credentials |
| 499 | smtpmail-auth-credentials host port))) | 499 | smtpmail-auth-credentiaals host port))) |
| 500 | (passwd (when cred | 500 | (passwd (when cred |
| 501 | (or (smtpmail-cred-passwd cred) | 501 | (or (smtpmail-cred-passwd cred) |
| 502 | (read-passwd | 502 | (read-passwd |
| @@ -504,7 +504,7 @@ This is relative to `smtpmail-queue-dir'.") | |||
| 504 | (smtpmail-cred-server cred) | 504 | (smtpmail-cred-server cred) |
| 505 | (smtpmail-cred-port cred)))))) | 505 | (smtpmail-cred-port cred)))))) |
| 506 | ret) | 506 | ret) |
| 507 | (when cred | 507 | (when (and cred mech) |
| 508 | (cond | 508 | (cond |
| 509 | ((eq mech 'cram-md5) | 509 | ((eq mech 'cram-md5) |
| 510 | (smtpmail-send-command process (format "AUTH %s" mech)) | 510 | (smtpmail-send-command process (format "AUTH %s" mech)) |