Index: lisp/gnus-agent.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/gnus-agent.el,v retrieving revision 6.172 diff -u -r6.172 gnus-agent.el --- lisp/gnus-agent.el 12 May 2003 18:43:29 -0000 6.172 +++ lisp/gnus-agent.el 12 May 2003 20:30:11 -0000 @@ -169,6 +169,15 @@ :type '(radio (const :format "Enable " ENABLE) (const :format "Disable " DISABLE))) +(defcustom gnus-agent-queue-mail t + "Whether and when outgoing mail should be queued by the agent. When +`always', always queue outgoing mail. When `nil', never queue. +Otherwise, queue if and only if unplugged." + :group 'gnus-agent + :type '(radio (const :format "Always" always) + (const :format "Never" nil) + (const :format "When plugged" t))) + (defcustom gnus-agent-expire-unagentized-dirs t "Have gnus-agent-expire scan the directories under \(gnus-agent-directory) for groups that are no longer agentized. When @@ -625,7 +634,8 @@ 'gnus-dummy '((gnus-draft-mode))))) (defun gnus-agent-send-mail () - (if gnus-plugged + (if (or (not gnus-agent-queue-mail) + (and gnus-plugged (not (eq gnus-agent-queue-mail 'always)))) (funcall gnus-agent-send-mail-function) (goto-char (point-min)) (re-search-forward Index: lisp/gnus-draft.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/gnus-draft.el,v retrieving revision 6.21 diff -u -r6.21 gnus-draft.el --- lisp/gnus-draft.el 12 Apr 2003 23:09:52 -0000 6.21 +++ lisp/gnus-draft.el 12 May 2003 20:30:11 -0000 @@ -141,6 +141,9 @@ message-send-hook)) (message-setup-hook (and group (not (equal group "nndraft:queue")) message-setup-hook)) + (gnus-agent-queue-mail (if (equal group "nndraft:queue") + nil + gnus-agent-queue-mail)) type method move-to) (gnus-draft-setup article (or group "nndraft:queue")) ;; We read the meta-information that says how and where @@ -206,7 +209,7 @@ (let ((message-sending-message (format "Sending message %d of %d..." (- total (length articles)) total))) - (gnus-draft-send article))))))) + (gnus-draft-send article "nndraft:queue"))))))) ;;;###autoload (defun gnus-draft-reminder ()