diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2006-06-15 18:34:26 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2006-06-15 18:34:26 +0000 |
commit | c43d75391af8665435c3db30eb61ca4630bd6a06 (patch) | |
tree | 08a5dd8b53ad50f69ce8f6bc6f839a3ab708dd07 /lisp/mail | |
parent | 3e0b9c08a04ca1df81854f0f40fe43b79aab8720 (diff) | |
download | emacs-c43d75391af8665435c3db30eb61ca4630bd6a06.tar.gz |
* mail/sendmail.el (mail-send): Search explicitly for
mail-header-separator when checking for corrupted header lines.
Diffstat (limited to 'lisp/mail')
-rw-r--r-- | lisp/mail/sendmail.el | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index ee512b3af31..28463208c45 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -863,11 +863,14 @@ the user from the mailer." (error "Message contains non-ASCII characters")))) ;; Complain about any invalid line. (goto-char (point-min)) - (while (< (point) (mail-header-end)) - (unless (looking-at "[ \t]\\|.*:\\|$") - (push-mark opoint) - (error "Invalid header line (maybe a continuation line lacks initial whitespace)")) - (forward-line 1)) + (re-search-forward (regexp-quote mail-header-separator) (point-max) t) + (let ((header-end (or (match-beginning 0) (point-max)))) + (goto-char (point-min)) + (while (< (point) header-end) + (unless (looking-at "[ \t]\\|.*:\\|$") + (push-mark opoint) + (error "Invalid header line (maybe a continuation line lacks initial whitespace)")) + (forward-line 1))) (goto-char opoint) (run-hooks 'mail-send-hook) (message "Sending...") |