summaryrefslogtreecommitdiff
path: root/lisp/mail
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2006-09-04 14:17:12 +0000
committerChong Yidong <cyd@stupidchicken.com>2006-09-04 14:17:12 +0000
commit82695714e8bf5c42f771dcb3e379944647012331 (patch)
tree09630d585de36e62eaae370e89c0439ad46dd405 /lisp/mail
parent5aa17bb2e50bbdcb6505f79b152914506a3d642a (diff)
downloademacs-82695714e8bf5c42f771dcb3e379944647012331.tar.gz
* mail/feedmail.el (feedmail-buffer-to-sendmail): Look for
sendmail in several common directories. * mail/sendmail.el (sendmail-program): Moved here from pathe.el. * paths.el (sendmail-program): Removed.
Diffstat (limited to 'lisp/mail')
-rw-r--r--lisp/mail/feedmail.el10
-rw-r--r--lisp/mail/sendmail.el10
2 files changed, 19 insertions, 1 deletions
diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el
index 3bd287541cf..04928fb537b 100644
--- a/lisp/mail/feedmail.el
+++ b/lisp/mail/feedmail.el
@@ -1340,7 +1340,15 @@ complicated cases."
(set-buffer prepped)
(apply 'call-process-region
(append (list (point-min) (point-max)
- (if (boundp 'sendmail-program) sendmail-program "/usr/lib/sendmail")
+ (cond ((boundp 'sendmail-program)
+ sendmail-program)
+ ((file-exists-p "/usr/sbin/sendmail")
+ "/usr/sbin/sendmail")
+ ((file-exists-p "/usr/lib/sendmail")
+ "/usr/lib/sendmail")
+ ((file-exists-p "/usr/ucblib/sendmail")
+ "/usr/ucblib/sendmail")
+ (t "fakemail"))
nil errors-to nil "-oi" "-t")
;; provide envelope "from" to sendmail; results will vary
(list "-f" user-mail-address)
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 28463208c45..288e5bd0df3 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -48,6 +48,16 @@
:group 'sendmail
:version "22.1")
+(defcustom sendmail-program
+ (cond
+ ((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail")
+ ((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail")
+ ((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail")
+ (t "fakemail")) ;In ../etc, to interface to /bin/mail.
+ "Program used to send messages."
+ :group 'mail
+ :type 'file)
+
;;;###autoload
(defcustom mail-from-style 'angles
"Specifies how \"From:\" fields look.