;;; 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 <delp@huey.Udel.Edu>
;; 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
;;; Code:
+(require 'mailalias)
+(require 'sendmail)
+
;; (setq send-mail-function 'post-mail-send-it)
(defun post-mail-send-it ()
(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
(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))
(if (bufferp errbuf)
(switch-to-buffer errbuf)))))
+(provide 'mailpost)
+
;;; mailpost.el ends here