diff options
author | Richard M. Stallman <[email protected]> | 2001-12-28 18:58:40 +0000 |
---|---|---|
committer | Richard M. Stallman <[email protected]> | 2001-12-28 18:58:40 +0000 |
commit | 00417fac361c4c600e3d75fb6cfbe97709606ad9 (patch) | |
tree | b34d4874b1fbaa3073e2c70c0b36a4a1dc45a755 /lisp/mail | |
parent | ade19cac432839b927051d37fe7937f7337c3318 (diff) |
(mail-envelope-from): Fix custom type.
(sendmail-send-it): Check mail-specify-envelope-from
and mail-envelope-from in the mail buffer at start.
Diffstat (limited to 'lisp/mail')
-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 34e653cc83..0927966e65 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -81,8 +81,8 @@ is a privileged operation." If this is nil while `mail-specify-envelope-from' is non-nil, the content of `user-mail-address' is used." :version "21.1" - :type '(choice (const :tag "Use `user-mail-address'" nil) - string) + :type '(choice (string :tag "From-name") + (const :tag "Use `user-mail-address'" nil)) :group 'sendmail) ;;;###autoload @@ -798,7 +798,11 @@ external program defined by `sendmail-program'." (program (if (boundp 'sendmail-program) sendmail-program "/usr/lib/sendmail")) - (mail-envelope-from mail-envelope-from)) + ;; Examine these variables now, so that + ;; local binding in the mail buffer will take effect. + (envelope-from + (and mail-specify-envelope-from + (or mail-envelope-from user-mail-address)))) (unwind-protect (save-excursion (set-buffer tembuf) @@ -964,9 +968,8 @@ external program defined by `sendmail-program'." (append (list (point-min) (point-max) program nil errbuf nil "-oi") - (and mail-specify-envelope-from - (list "-f" (or mail-envelope-from - user-mail-address))) + (and envelope-from + (list "-f" envelope-from)) ;;; ;; Don't say "from root" if running under su. ;;; (and (equal (user-real-login-name) "root") ;;; (list "-f" (user-login-name))) |