X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/fd7fa35a05844aaa716dc8c8511947bed03ca989..6e66e4c6fc350fe8cb85d4cc35d9ca567df56548:/lisp/mail/mailpost.el diff --git a/lisp/mail/mailpost.el b/lisp/mail/mailpost.el index f39d8ee61c..2bb5764948 100644 --- a/lisp/mail/mailpost.el +++ b/lisp/mail/mailpost.el @@ -1,14 +1,13 @@ ;;; mailpost.el --- RMAIL coupler to /usr/uci/post mailer +;; This is in the public domain +;; since Delp distributed it without a copyright notice in 1986. + ;; Author: Gary Delp ;; Maintainer: FSF ;; Created: 13 Jan 1986 -;; Last-Modified: 30 May 1992 ;; Keywords: mail -;; This is in the public domain -;; since Delp distributed it without a copyright notice in 1986. - ;;; Commentary: ;; Yet another mail interface. this for the rmail system to provide @@ -17,6 +16,9 @@ ;;; Code: +(require 'mailalias) +(require 'sendmail) + ;; (setq send-mail-function 'post-mail-send-it) (defun post-mail-send-it () @@ -26,7 +28,7 @@ site-init." (let ((errbuf (if mail-interactive (generate-new-buffer " post-mail errors") 0)) - (temfile "/tmp/,rpost") + (temfile (expand-file-name ",rpost" temporary-file-directory)) (tembuf (generate-new-buffer " post-mail temp")) (case-fold-search nil) delimline @@ -41,10 +43,7 @@ site-init." (or (= (preceding-char) ?\n) (insert ?\n)) ;; Change header-delimiter to be what post-mail expects. - (goto-char (point-min)) - (search-forward (concat "\n" mail-header-separator "\n")) - (replace-match "\n\n") - (backward-char 1) + (mail-sendmail-undelimit-header) (setq delimline (point-marker)) (if mail-aliases (expand-mail-aliases (point-min) delimline)) @@ -98,4 +97,6 @@ site-init." (if (bufferp errbuf) (switch-to-buffer errbuf))))) +(provide 'mailpost) + ;;; mailpost.el ends here