diff options
| author | Richard M. Stallman | 2001-12-28 18:58:40 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2001-12-28 18:58:40 +0000 |
| commit | 00417fac361c4c600e3d75fb6cfbe97709606ad9 (patch) | |
| tree | b34d4874b1fbaa3073e2c70c0b36a4a1dc45a755 | |
| parent | ade19cac432839b927051d37fe7937f7337c3318 (diff) | |
| download | emacs-00417fac361c4c600e3d75fb6cfbe97709606ad9.tar.gz emacs-00417fac361c4c600e3d75fb6cfbe97709606ad9.zip | |
(mail-envelope-from): Fix custom type.
(sendmail-send-it): Check mail-specify-envelope-from
and mail-envelope-from in the mail buffer at start.
| -rw-r--r-- | lisp/mail/sendmail.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 34e653cc834..0927966e651 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el | |||
| @@ -81,8 +81,8 @@ is a privileged operation." | |||
| 81 | If this is nil while `mail-specify-envelope-from' is non-nil, the | 81 | If this is nil while `mail-specify-envelope-from' is non-nil, the |
| 82 | content of `user-mail-address' is used." | 82 | content of `user-mail-address' is used." |
| 83 | :version "21.1" | 83 | :version "21.1" |
| 84 | :type '(choice (const :tag "Use `user-mail-address'" nil) | 84 | :type '(choice (string :tag "From-name") |
| 85 | string) | 85 | (const :tag "Use `user-mail-address'" nil)) |
| 86 | :group 'sendmail) | 86 | :group 'sendmail) |
| 87 | 87 | ||
| 88 | ;;;###autoload | 88 | ;;;###autoload |
| @@ -798,7 +798,11 @@ external program defined by `sendmail-program'." | |||
| 798 | (program (if (boundp 'sendmail-program) | 798 | (program (if (boundp 'sendmail-program) |
| 799 | sendmail-program | 799 | sendmail-program |
| 800 | "/usr/lib/sendmail")) | 800 | "/usr/lib/sendmail")) |
| 801 | (mail-envelope-from mail-envelope-from)) | 801 | ;; Examine these variables now, so that |
| 802 | ;; local binding in the mail buffer will take effect. | ||
| 803 | (envelope-from | ||
| 804 | (and mail-specify-envelope-from | ||
| 805 | (or mail-envelope-from user-mail-address)))) | ||
| 802 | (unwind-protect | 806 | (unwind-protect |
| 803 | (save-excursion | 807 | (save-excursion |
| 804 | (set-buffer tembuf) | 808 | (set-buffer tembuf) |
| @@ -964,9 +968,8 @@ external program defined by `sendmail-program'." | |||
| 964 | (append (list (point-min) (point-max) | 968 | (append (list (point-min) (point-max) |
| 965 | program | 969 | program |
| 966 | nil errbuf nil "-oi") | 970 | nil errbuf nil "-oi") |
| 967 | (and mail-specify-envelope-from | 971 | (and envelope-from |
| 968 | (list "-f" (or mail-envelope-from | 972 | (list "-f" envelope-from)) |
| 969 | user-mail-address))) | ||
| 970 | ;;; ;; Don't say "from root" if running under su. | 973 | ;;; ;; Don't say "from root" if running under su. |
| 971 | ;;; (and (equal (user-real-login-name) "root") | 974 | ;;; (and (equal (user-real-login-name) "root") |
| 972 | ;;; (list "-f" (user-login-name))) | 975 | ;;; (list "-f" (user-login-name))) |