From 3ced8da5f646691148e6c57f173aab6ca8c6a767 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Mon, 30 Jul 2001 11:03:21 +0000 Subject: [PATCH] * smtpmail.el (smtpmail-send-it): Work even if the first line of the subject field has no content (synch with Emacs 20.3). --- ChangeLog | 5 +++++ smtpmail.el | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3c73ef3..7361d05 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-07-16 Katsumi Yamaoka + + * smtpmail.el (smtpmail-send-it): Work even if the first line of + the subject field has no content (synch with Emacs 20.3). + 2001-07-30 AMAKAWA Shuhei * smtp.el(smtp-submit-package): Send EHLO after starttls. diff --git a/smtpmail.el b/smtpmail.el index dae1378..cdc396c 100644 --- a/smtpmail.el +++ b/smtpmail.el @@ -154,8 +154,12 @@ This is relative to `smtpmail-queue-dir'.") ;;; (insert "Sender: " (user-login-name) "\n"))) ;; Don't send out a blank subject line (goto-char (point-min)) - (if (re-search-forward "^Subject:[ \t]*\n" delimline t) - (replace-match "")) + (if (re-search-forward "^Subject:\\([ \t]*\n\\)+\\b" delimline t) + (replace-match "") + ;; This one matches a Subject just before the header delimiter. + (if (and (re-search-forward "^Subject:\\([ \t]*\n\\)+" delimline t) + (= (match-end 0) delimline)) + (replace-match ""))) ;; Put the "From:" field in unless for some odd reason ;; they put one in themselves. (goto-char (point-min)) -- 1.7.10.4