Synch with Oort Gnus.
authoryamaoka <yamaoka>
Wed, 5 Jun 2002 10:00:21 +0000 (10:00 +0000)
committeryamaoka <yamaoka>
Wed, 5 Jun 2002 10:00:21 +0000 (10:00 +0000)
lisp/ChangeLog
lisp/message.el

index 062047c..9a4fec2 100644 (file)
@@ -1,3 +1,8 @@
+2002-06-05  Kai Gro\e,b_\e(Bjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+       * message.el (message-send-mail-with-sendmail): Check return value
+       from call-process-region.
+
 2002-06-04  Simon Josefsson  <jas@extundo.com>
 
        * gnus-msg.el (gnus-group-mail, gnus-group-news)
index f87e0a4..5630cfd 100644 (file)
@@ -3478,31 +3478,34 @@ This sub function is for exclusive use of `message-send-mail'."
        (save-excursion
          (set-buffer errbuf)
          (erase-buffer))))
-    (let ((default-directory "/"))
-      (as-binary-process
-       (apply 'call-process-region
-             (append (list (point-min) (point-max)
-                           (if (boundp 'sendmail-program)
-                               sendmail-program
-                             "/usr/lib/sendmail")
-                           nil errbuf nil "-oi")
-                     ;; Always specify who from,
-                     ;; since some systems have broken sendmails.
-                     ;; But some systems are more broken with -f, so
-                     ;; we'll let users override this.
-                     (if (null message-sendmail-f-is-evil)
-                         (list "-f" (message-make-address)))
-                     ;; These mean "report errors by mail"
-                     ;; and "deliver in background".
-                     (if (null message-interactive) '("-oem" "-odb"))
-                     ;; Get the addresses from the message
-                     ;; unless this is a resend.
-                     ;; We must not do that for a resend
-                     ;; because we would find the original addresses.
-                     ;; For a resend, include the specific addresses.
-                     (if resend-to-addresses
-                         (list resend-to-addresses)
-                       '("-t"))))))
+    (let* ((default-directory "/")
+          (cpr
+           (as-binary-process
+            (apply 'call-process-region
+                   (append (list (point-min) (point-max)
+                                 (if (boundp 'sendmail-program)
+                                     sendmail-program
+                                   "/usr/lib/sendmail")
+                                 nil errbuf nil "-oi")
+                           ;; Always specify who from,
+                           ;; since some systems have broken sendmails.
+                           ;; But some systems are more broken with -f, so
+                           ;; we'll let users override this.
+                           (if (null message-sendmail-f-is-evil)
+                               (list "-f" (message-make-address)))
+                           ;; These mean "report errors by mail"
+                           ;; and "deliver in background".
+                           (if (null message-interactive) '("-oem" "-odb"))
+                           ;; Get the addresses from the message
+                           ;; unless this is a resend.
+                           ;; We must not do that for a resend
+                           ;; because we would find the original addresses.
+                           ;; For a resend, include the specific addresses.
+                           (if resend-to-addresses
+                               (list resend-to-addresses)
+                             '("-t")))))))
+      (unless (zerop cpr)
+       (error "Sending...failed: %s" cpr)))
     (when message-interactive
       (save-excursion
        (set-buffer errbuf)