diff lisp/gnus/message.el @ 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 6ee457a7e830
children 637b0854d9b5 c358d0861b16
line wrap: on
line diff
--- 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.