Commit bfc77306 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(sendmail-send-it): Handle resent-to specially.

parent 5e84269a
......@@ -382,6 +382,7 @@ the user from the mailer."
(tembuf (generate-new-buffer " sendmail temp"))
(case-fold-search nil)
(mailbuf (current-buffer)))
......@@ -413,6 +414,17 @@ the user from the mailer."
(goto-char (point-min))
(if (re-search-forward "^FCC:" delimline t)
(mail-do-fcc delimline))
(goto-char (point-min))
(require 'mail-utils)
(while (re-search-forward "^Resent-to:" delimline t)
(setq resend-to-addresses
(narrow-to-region (point)
(append (mail-parse-comma-list)
;;; Apparently this causes a duplicate Sender.
;;; ;; If the From is different than current user, insert Sender.
;;; (goto-char (point-min))
......@@ -450,8 +462,7 @@ the user from the mailer."
(if (boundp 'sendmail-program)
nil errbuf nil
"-oi" "-t")
nil errbuf nil "-oi")
;; Always specify who from,
;; since some systems have broken sendmails.
(list "-f" (user-login-name))
......@@ -462,7 +473,14 @@ the user from the mailer."
(list (concat "-oA" mail-alias-file)))
;; These mean "report errors by mail"
;; and "deliver in background".
(if (null mail-interactive) '("-oem" "-odb"))))
(if (null mail-interactive) '("-oem" "-odb"))
;; Get the addresses from the message
;; unless this is a resend.
;; We must not do that for a resend
;; because we would find the original addresses.
;; For a resend, include the specific addresses.
(or resend-to-addresses
(if mail-interactive
(set-buffer errbuf)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment