aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2011-05-12 19:06:35 -0700
committerGlenn Morris2011-05-12 19:06:35 -0700
commit5237a44fef24911b77fd6e4f55c0e319f9747641 (patch)
tree44d475c2527f37ae0bf228af6d0d4ce9dac51cb4
parent8340026caeee82b1972f40e7a1bd0d83edbaecef (diff)
downloademacs-5237a44fef24911b77fd6e4f55c0e319f9747641.tar.gz
emacs-5237a44fef24911b77fd6e4f55c0e319f9747641.zip
* lisp/mail/feedmail.el (feedmail-buffer-to-sendmail): Require sendmail.
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/mail/feedmail.el14
2 files changed, 6 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ccfc6f6a405..3fa18d2480b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,7 @@
12011-05-13 Glenn Morris <rgm@gnu.org> 12011-05-13 Glenn Morris <rgm@gnu.org>
2 2
3 * mail/feedmail.el (feedmail-buffer-to-sendmail): Require sendmail.
4
3 * mail/sendmail.el (sendmail-program): Try executable-find first. 5 * mail/sendmail.el (sendmail-program): Try executable-find first.
4 (sendmail-send-it): sendmail-program cannot be unbound. 6 (sendmail-send-it): sendmail-program cannot be unbound.
5 7
diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el
index 597344fb88a..56936e88efe 100644
--- a/lisp/mail/feedmail.el
+++ b/lisp/mail/feedmail.el
@@ -1312,22 +1312,16 @@ Feeds the buffer to it."
1312 (mapconcat 'identity addr-listoid " ")))))) 1312 (mapconcat 'identity addr-listoid " "))))))
1313 1313
1314 1314
1315(defvar sendmail-program)
1316
1315(defun feedmail-buffer-to-sendmail (prepped errors-to addr-listoid) 1317(defun feedmail-buffer-to-sendmail (prepped errors-to addr-listoid)
1316 "Function which actually calls sendmail as a subprocess. 1318 "Function which actually calls sendmail as a subprocess.
1317Feeds the buffer to it. Probably has some flaws for Resent-* and other 1319Feeds the buffer to it. Probably has some flaws for Resent-* and other
1318complicated cases." 1320complicated cases."
1321 (require 'sendmail)
1319 (set-buffer prepped) 1322 (set-buffer prepped)
1320 (apply 'call-process-region 1323 (apply 'call-process-region
1321 (append (list (point-min) (point-max) 1324 (append (list (point-min) (point-max) sendmail-program
1322 (cond ((boundp 'sendmail-program)
1323 sendmail-program)
1324 ((file-exists-p "/usr/sbin/sendmail")
1325 "/usr/sbin/sendmail")
1326 ((file-exists-p "/usr/lib/sendmail")
1327 "/usr/lib/sendmail")
1328 ((file-exists-p "/usr/ucblib/sendmail")
1329 "/usr/ucblib/sendmail")
1330 (t "fakemail"))
1331 nil errors-to nil "-oi" "-t") 1325 nil errors-to nil "-oi" "-t")
1332 ;; provide envelope "from" to sendmail; results will vary 1326 ;; provide envelope "from" to sendmail; results will vary
1333 (list "-f" user-mail-address) 1327 (list "-f" user-mail-address)