comparison lisp/mail/sendmail.el @ 38308:2ec4983f57eb

(mail-specify-envelope-from): Doc fix. (mail-envelope-from): New user option. (sendmail-send-it): Use it.
author Gerd Moellmann <gerd@gnu.org>
date Fri, 06 Jul 2001 10:30:49 +0000
parents b7db38e7d28d
children 99a7b10f0164
comparison
equal deleted inserted replaced
38307:37d58b4d2619 38308:2ec4983f57eb
65 :group 'sendmail) 65 :group 'sendmail)
66 66
67 ;;;###autoload 67 ;;;###autoload
68 (defcustom mail-specify-envelope-from nil 68 (defcustom mail-specify-envelope-from nil
69 "*If non-nil, specify the envelope-from address when sending mail. 69 "*If non-nil, specify the envelope-from address when sending mail.
70 The value used to specify it is whatever is found in `user-mail-address'. 70 The value used to specify it is whatever is found in
71 `mail-envelope-from', with `user-mail-address' as fallback.
71 72
72 On most systems, specifying the envelope-from address 73 On most systems, specifying the envelope-from address
73 is a privileged operation." 74 is a privileged operation."
75 :version "21.1"
76 :type 'boolean
77 :group 'sendmail)
78
79 (defcustom mail-envelope-from nil
80 "*If non-nil, designate the envelope-from address when sending mail.
81 If this is nil while `mail-specify-envelope-from' is non-nil, the
82 content of `user-mail-address' is used."
74 :version "21.1" 83 :version "21.1"
75 :type 'boolean 84 :type 'boolean
76 :group 'sendmail) 85 :group 'sendmail)
77 86
78 ;;;###autoload 87 ;;;###autoload
799 delimline 808 delimline
800 fcc-was-found 809 fcc-was-found
801 (mailbuf (current-buffer)) 810 (mailbuf (current-buffer))
802 (program (if (boundp 'sendmail-program) 811 (program (if (boundp 'sendmail-program)
803 sendmail-program 812 sendmail-program
804 "/usr/lib/sendmail")) 813 "/usr/lib/sendmail")))
805 (originator user-mail-address))
806 (unwind-protect 814 (unwind-protect
807 (save-excursion 815 (save-excursion
808 (set-buffer tembuf) 816 (set-buffer tembuf)
809 (erase-buffer) 817 (erase-buffer)
810 (insert-buffer-substring mailbuf) 818 (insert-buffer-substring mailbuf)
966 (select-message-coding-system))) 974 (select-message-coding-system)))
967 (args 975 (args
968 (append (list (point-min) (point-max) 976 (append (list (point-min) (point-max)
969 program 977 program
970 nil errbuf nil "-oi") 978 nil errbuf nil "-oi")
971 (and mail-specify-envelope-from 979 (and mail-specify-envelope-from
972 (list "-f" originator)) 980 (list "-f" (or mail-envelope-from
981 user-mail-address)))
973 ;;; ;; Don't say "from root" if running under su. 982 ;;; ;; Don't say "from root" if running under su.
974 ;;; (and (equal (user-real-login-name) "root") 983 ;;; (and (equal (user-real-login-name) "root")
975 ;;; (list "-f" (user-login-name))) 984 ;;; (list "-f" (user-login-name)))
976 (and mail-alias-file 985 (and mail-alias-file
977 (list (concat "-oA" mail-alias-file))) 986 (list (concat "-oA" mail-alias-file)))