;;; gnus-draft.el --- draft message support for Gnus
-;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
"Send message ARTICLE."
(let ((message-syntax-checks (if interactive message-syntax-checks
'dont-check-for-anything-just-trust-me))
+ (message-hidden-headers nil)
(message-inhibit-body-encoding (or (not group)
(equal group "nndraft:queue")
message-inhibit-body-encoding))
message-send-hook))
(message-setup-hook (and group (not (equal group "nndraft:queue"))
message-setup-hook))
- type method)
+ type method move-to)
(gnus-draft-setup article (or group "nndraft:queue"))
;; We read the meta-information that says how and where
;; this message is to be sent.
(save-restriction
(message-narrow-to-head)
+ (when (re-search-forward
+ (concat "^" (regexp-quote gnus-agent-target-move-group-header)
+ ":") nil t)
+ (skip-syntax-forward "-")
+ (setq move-to (buffer-substring (point) (gnus-point-at-eol)))
+ (message-remove-header gnus-agent-target-move-group-header))
+ (goto-char (point-min))
(when (re-search-forward
(concat "^" (regexp-quote gnus-agent-meta-information-header) ":")
nil t)
(message-this-is-mail (eq type 'mail))
(gnus-post-method method)
(message-post-method method))
- (message-send-and-exit))
- (message-send-and-exit)))
+ (if move-to
+ (gnus-inews-do-gcc move-to)
+ (message-send-and-exit)))
+ (if move-to
+ (gnus-inews-do-gcc move-to)
+ (message-send-and-exit))))
(let ((gnus-verbose-backends nil))
(gnus-request-expire-articles
(list article) (or group "nndraft:queue") t)))))
(ignore-errors (setq ga (car (read-from-string ga)))))
(setq gnus-newsgroup-name
(if (equal (car ga) "") nil (car ga)))
+ (gnus-configure-posting-styles)
(setq gnus-message-group-art (cons gnus-newsgroup-name (cadr ga)))
(setq message-post-method
`(lambda (arg)