# HG changeset patch # User Chong Yidong # Date 1157379490 0 # Node ID cbdca6c6638dc210db0721a531bae14c8a180e58 # Parent e4183d5068ec67fd24459911ad1bd90be7ca3158 * message.el (message-send-mail-with-sendmail): Look for sendmail in several common directories. diff -r e4183d5068ec -r cbdca6c6638d lisp/gnus/ChangeLog --- 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 + + * message.el (message-send-mail-with-sendmail): Look for sendmail in + several common directories. + 2006-09-04 Katsumi Yamaoka * rfc2047.el (rfc2047-strip-backslashes-in-quoted-strings): Decode `\\' diff -r e4183d5068ec -r cbdca6c6638d lisp/gnus/message.el --- 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.