X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/e8a57935cbb4ccde7f621eeeca22141e5a5327b4..6e66e4c6fc350fe8cb85d4cc35d9ca567df56548:/lisp/mail/mailpost.el diff --git a/lisp/mail/mailpost.el b/lisp/mail/mailpost.el index 5ff3347869..2bb5764948 100644 --- a/lisp/mail/mailpost.el +++ b/lisp/mail/mailpost.el @@ -28,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 @@ -43,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)) @@ -100,4 +97,6 @@ site-init." (if (bufferp errbuf) (switch-to-buffer errbuf))))) +(provide 'mailpost) + ;;; mailpost.el ends here