diff options
| author | Bastien Guerry | 2008-02-13 21:52:41 +0000 |
|---|---|---|
| committer | Bastien Guerry | 2008-02-13 21:52:41 +0000 |
| commit | 5b5eae56a2a6324fe081bbfd1b3eec9b57492b7a (patch) | |
| tree | 60a6a97179769e7368bd8c57e89c00f702483f6e | |
| parent | 765e147aa10b82c39cc0e139162b5dc6320219c6 (diff) | |
| download | emacs-5b5eae56a2a6324fe081bbfd1b3eec9b57492b7a.tar.gz emacs-5b5eae56a2a6324fe081bbfd1b3eec9b57492b7a.zip | |
* mail/smtpmail.el: Use password-cache.
| -rw-r--r-- | lisp/ChangeLog | 11 | ||||
| -rw-r--r-- | lisp/mail/smtpmail.el | 14 |
2 files changed, 18 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 876928350ba..3b588094479 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2008-02-13 Bastien Guerry <bzg@altern.org> | ||
| 2 | |||
| 3 | * mail/rmail.el (rmail-header-name): New face. | ||
| 4 | (rmail-font-lock-keywords): Use rmail-header-name. | ||
| 5 | |||
| 6 | * mail/smtpmail.el: Use password-cache. | ||
| 7 | |||
| 8 | * mail/rmail-spam-filter.el (rsf-definitions-alist): Allow check | ||
| 9 | against X-Spam-Status header field. | ||
| 10 | (rmail-spam-filter): Also check X-Spam-Status header field. | ||
| 11 | |||
| 1 | 2008-02-14 Mark A. Hershberger <mah@everybody.org> | 12 | 2008-02-14 Mark A. Hershberger <mah@everybody.org> |
| 2 | 13 | ||
| 3 | * progmodes/flymake.el (flymake-allowed-file-name-masks): Add | 14 | * progmodes/flymake.el (flymake-allowed-file-name-masks): Add |
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 57d06c08dfc..a8d95cf1420 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el | |||
| @@ -78,6 +78,7 @@ | |||
| 78 | (autoload 'netrc-parse "netrc") | 78 | (autoload 'netrc-parse "netrc") |
| 79 | (autoload 'netrc-machine "netrc") | 79 | (autoload 'netrc-machine "netrc") |
| 80 | (autoload 'netrc-get "netrc") | 80 | (autoload 'netrc-get "netrc") |
| 81 | (autoload 'password-read "password") ; for new emacsen: "password-cache" | ||
| 81 | 82 | ||
| 82 | ;;; | 83 | ;;; |
| 83 | (defgroup smtpmail nil | 84 | (defgroup smtpmail nil |
| @@ -546,12 +547,12 @@ This is relative to `smtpmail-queue-dir'.") | |||
| 546 | (netrc-get hostentry "password")))) | 547 | (netrc-get hostentry "password")))) |
| 547 | (smtpmail-find-credentials | 548 | (smtpmail-find-credentials |
| 548 | smtpmail-auth-credentials host port))) | 549 | smtpmail-auth-credentials host port))) |
| 550 | (prompt (when cred (format "SMTP password for %s:%s: " | ||
| 551 | (smtpmail-cred-server cred) | ||
| 552 | (smtpmail-cred-port cred)))) | ||
| 549 | (passwd (when cred | 553 | (passwd (when cred |
| 550 | (or (smtpmail-cred-passwd cred) | 554 | (or (smtpmail-cred-passwd cred) |
| 551 | (read-passwd | 555 | (password-read prompt prompt)))) |
| 552 | (format "SMTP password for %s:%s: " | ||
| 553 | (smtpmail-cred-server cred) | ||
| 554 | (smtpmail-cred-port cred)))))) | ||
| 555 | ret) | 556 | ret) |
| 556 | (when (and cred mech) | 557 | (when (and cred mech) |
| 557 | (cond | 558 | (cond |
| @@ -621,9 +622,8 @@ This is relative to `smtpmail-queue-dir'.") | |||
| 621 | (t | 622 | (t |
| 622 | (error "Mechanism %s not implemented" mech))) | 623 | (error "Mechanism %s not implemented" mech))) |
| 623 | ;; Remember the password. | 624 | ;; Remember the password. |
| 624 | (when (and (not (stringp smtpmail-auth-credentials)) | 625 | (when (null (smtpmail-cred-passwd cred)) |
| 625 | (null (smtpmail-cred-passwd cred))) | 626 | (password-cache-add prompt passwd))))) |
| 626 | (setcar (cdr (cdr (cdr cred))) passwd))))) | ||
| 627 | 627 | ||
| 628 | (defun smtpmail-via-smtp (recipient smtpmail-text-buffer) | 628 | (defun smtpmail-via-smtp (recipient smtpmail-text-buffer) |
| 629 | (let ((process nil) | 629 | (let ((process nil) |