changeset 5667:03c03462bca3

(mail-mailer-swallows-blank-line): New variable. (sendmail-send-it): Add extra newline if appropriate.
author Richard M. Stallman <rms@gnu.org>
date Mon, 24 Jan 1994 23:52:51 +0000
parents ceed2e32b303
children 139b23d6a97b
files lisp/mail/sendmail.el
diffstat 1 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/sendmail.el	Mon Jan 24 17:07:28 1994 +0000
+++ b/lisp/mail/sendmail.el	Mon Jan 24 23:52:51 1994 +0000
@@ -126,6 +126,16 @@
 It is inserted before you edit the message,
 so you can edit or delete these lines.")
 
+;; Note: could use /usr/ucb/mail instead of sendmail;
+;; options -t, and -v if not interactive.
+(defvar mail-mailer-swallows-blank-line
+  (if (string-match "sparc-sun-sunos\\(\\'\\|[^5]\\)" system-configuration)
+      '(looking-at " \t")
+  "Set this non-nil if the system's mailer runs the header and body together.
+\(This problem exists on Sunos 4 when sendmail is run in remote mode.)
+The value should be an expression to test whether the problem will
+actually occur.")
+
 (defvar mail-mode-syntax-table nil
   "Syntax table used while in mail mode.")
 
@@ -402,6 +412,11 @@
 	    (goto-char (point-min))
 	    (if (re-search-forward "^Subject:[ \t]*\n" delimline t)
 		(replace-match ""))
+	    ;; Insert an extra newline if we need it to work around
+	    ;; Sun's bug that swallows newlines.
+	    (goto-char (1+ delimline))
+	    (if (eval mail-mailer-swallows-blank-line)
+		(newline))
 	    (if mail-interactive
 		(save-excursion
 		  (set-buffer errbuf)