changeset 15648:2feeabc94834

(smtpmail-deduce-address-list): Handle RESENT-* fields.
author Karl Heuer <kwzh@gnu.org>
date Fri, 12 Jul 1996 00:09:50 +0000
parents f898a38206ab
children 3ee2f3ce0a07
files lisp/mail/smtpmail.el
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/smtpmail.el	Fri Jul 12 00:08:09 1996 +0000
+++ b/lisp/mail/smtpmail.el	Fri Jul 12 00:09:50 1996 +0000
@@ -447,7 +447,8 @@
       ((case-fold-search t)
        (simple-address-list "")
        this-line
-       this-line-end)
+       this-line-end
+       addr-regexp)
     
     (unwind-protect
 	(save-excursion
@@ -455,7 +456,13 @@
 	  (set-buffer smtpmail-address-buffer) (erase-buffer)
 	  (insert-buffer-substring smtpmail-text-buffer header-start header-end)
 	  (goto-char (point-min))
-	  (while (re-search-forward "^\\(TO:\\|CC:\\|BCC:\\)" header-end t)
+	  ;; RESENT-* fields should stop processing of regular fields.
+	  (save-excursion
+	    (if (re-search-forward "^RESENT-TO:" header-end t)
+		(setq addr-regexp "^\\(RESENT-TO:\\|RESENT-CC:\\|RESENT-BCC:\\)")
+	      (setq addr-regexp  "^\\(TO:\\|CC:\\|BCC:\\)")))
+
+	  (while (re-search-forward addr-regexp header-end t)
 	    (replace-match "")
 	    (setq this-line (match-beginning 0))
 	    (forward-line 1)