changeset 72636:cbdca6c6638d

* message.el (message-send-mail-with-sendmail): Look for sendmail in several common directories.
author Chong Yidong <cyd@stupidchicken.com>
date Mon, 04 Sep 2006 14:18:10 +0000
parents e4183d5068ec
children 9db8c9a68f0f
files lisp/gnus/ChangeLog lisp/gnus/message.el
diffstat 2 files changed, 14 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Mon Sep 04 14:17:12 2006 +0000
+++ b/lisp/gnus/ChangeLog	Mon Sep 04 14:18:10 2006 +0000
@@ -1,3 +1,8 @@
+2006-09-04  Chong Yidong  <cyd@stupidchicken.com>
+
+	* message.el (message-send-mail-with-sendmail): Look for sendmail in
+	several common directories.
+
 2006-09-04  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 	* rfc2047.el (rfc2047-strip-backslashes-in-quoted-strings): Decode `\\'
--- a/lisp/gnus/message.el	Mon Sep 04 14:17:12 2006 +0000
+++ b/lisp/gnus/message.el	Mon Sep 04 14:18:10 2006 +0000
@@ -3897,9 +3897,15 @@
 		       '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 errbuf nil "-oi")
 			;; Always specify who from,
 			;; since some systems have broken sendmails.