Function: message-insert-to

message-insert-to is an interactive and byte-compiled function defined in message.el.gz.

Signature

(message-insert-to &optional FORCE)

Documentation

Insert a To header that points to the author of the article being replied to.

If the original author requested not to be sent mail, don't insert unless the prefix FORCE is given.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/message.el.gz
(defun message-insert-to (&optional force)
  "Insert a To header that points to the author of the article being replied to.
If the original author requested not to be sent mail, don't insert unless the
prefix FORCE is given."
  (interactive "P" message-mode)
  (let* ((mct (message-fetch-reply-field "mail-copies-to"))
	 (dont (and mct (or (equal (downcase mct) "never")
			    (equal (downcase mct) "nobody"))))
	 (to (or (message-fetch-reply-field "mail-reply-to")
		 (message-fetch-reply-field "reply-to")
		 (message-fetch-reply-field "from"))))
    (when (and dont to)
      (message
       (if force
	   "Ignoring the user request not to have copies sent via mail"
	 "Complying with the user request not to have copies sent via mail")))
    (when (and force (not to))
      (error "No mail address in the article"))
    (when (and to (or force (not dont)))
      (message-carefully-insert-headers (list (cons 'To to))))))