comparison lisp/mail/sendmail.el @ 71349:424b1f91f07b

* mail/sendmail.el (mail-send): Search explicitly for mail-header-separator when checking for corrupted header lines.
author Chong Yidong <cyd@stupidchicken.com>
date Thu, 15 Jun 2006 18:34:26 +0000
parents 067115a6e738
children e4183d5068ec 138027c8c982
comparison
equal deleted inserted replaced
71348:10a6583c5ff7 71349:424b1f91f07b
861 (or (y-or-n-p "Message contains non-ASCII characters; send anyway? ") 861 (or (y-or-n-p "Message contains non-ASCII characters; send anyway? ")
862 (error "Aborted")) 862 (error "Aborted"))
863 (error "Message contains non-ASCII characters")))) 863 (error "Message contains non-ASCII characters"))))
864 ;; Complain about any invalid line. 864 ;; Complain about any invalid line.
865 (goto-char (point-min)) 865 (goto-char (point-min))
866 (while (< (point) (mail-header-end)) 866 (re-search-forward (regexp-quote mail-header-separator) (point-max) t)
867 (unless (looking-at "[ \t]\\|.*:\\|$") 867 (let ((header-end (or (match-beginning 0) (point-max))))
868 (push-mark opoint) 868 (goto-char (point-min))
869 (error "Invalid header line (maybe a continuation line lacks initial whitespace)")) 869 (while (< (point) header-end)
870 (forward-line 1)) 870 (unless (looking-at "[ \t]\\|.*:\\|$")
871 (push-mark opoint)
872 (error "Invalid header line (maybe a continuation line lacks initial whitespace)"))
873 (forward-line 1)))
871 (goto-char opoint) 874 (goto-char opoint)
872 (run-hooks 'mail-send-hook) 875 (run-hooks 'mail-send-hook)
873 (message "Sending...") 876 (message "Sending...")
874 (funcall send-mail-function) 877 (funcall send-mail-function)
875 ;; Now perform actions on successful sending. 878 ;; Now perform actions on successful sending.