132 |
|
|
133 |
(defun gnus-draft-send (article &optional group interactive) |
(defun gnus-draft-send (article &optional group interactive) |
134 |
"Send message ARTICLE." |
"Send message ARTICLE." |
135 |
(let ((message-syntax-checks (if interactive message-syntax-checks |
(let* ((is-queue (or (not group) |
136 |
'dont-check-for-anything-just-trust-me)) |
(equal group "nndraft:queue"))) |
137 |
(message-hidden-headers nil) |
(message-syntax-checks (if interactive message-syntax-checks |
138 |
(message-inhibit-body-encoding (or (not group) |
'dont-check-for-anything-just-trust-me)) |
139 |
(equal group "nndraft:queue") |
(message-hidden-headers nil) |
140 |
message-inhibit-body-encoding)) |
(message-inhibit-body-encoding (or is-queue |
141 |
(message-send-hook (and group (not (equal group "nndraft:queue")) |
message-inhibit-body-encoding)) |
142 |
message-send-hook)) |
(message-send-hook (and (not is-queue) |
143 |
(message-setup-hook (and group (not (equal group "nndraft:queue")) |
message-send-hook)) |
144 |
message-setup-hook)) |
(message-setup-hook (and (not is-queue) |
145 |
type method move-to) |
message-setup-hook)) |
146 |
|
(gnus-agent-queue-mail (and (not is-queue) |
147 |
|
gnus-agent-queue-mail)) |
148 |
|
(rfc2047-encode-encoded-words nil) |
149 |
|
type method move-to) |
150 |
(gnus-draft-setup article (or group "nndraft:queue")) |
(gnus-draft-setup article (or group "nndraft:queue")) |
151 |
;; We read the meta-information that says how and where |
;; We read the meta-information that says how and where |
152 |
;; this message is to be sent. |
;; this message is to be sent. |
200 |
(defun gnus-group-send-queue () |
(defun gnus-group-send-queue () |
201 |
"Send all sendable articles from the queue group." |
"Send all sendable articles from the queue group." |
202 |
(interactive) |
(interactive) |
203 |
(gnus-activate-group "nndraft:queue") |
(when (or gnus-plugged |
204 |
(save-excursion |
(not gnus-agent-prompt-send-queue) |
205 |
(let* ((articles (nndraft-articles)) |
(gnus-y-or-n-p "Gnus is unplugged; really send queue? ")) |
206 |
(unsendable (gnus-uncompress-range |
(gnus-activate-group "nndraft:queue") |
207 |
(cdr (assq 'unsend |
(save-excursion |
208 |
(gnus-info-marks |
(let* ((articles (nndraft-articles)) |
209 |
(gnus-get-info "nndraft:queue")))))) |
(unsendable (gnus-uncompress-range |
210 |
(gnus-posting-styles nil) |
(cdr (assq 'unsend |
211 |
(total (length articles)) |
(gnus-info-marks |
212 |
article) |
(gnus-get-info "nndraft:queue")))))) |
213 |
(while (setq article (pop articles)) |
(gnus-posting-styles nil) |
214 |
(unless (memq article unsendable) |
(total (length articles)) |
215 |
(let ((message-sending-message |
article) |
216 |
(format "Sending message %d of %d..." |
(while (setq article (pop articles)) |
217 |
(- total (length articles)) total))) |
(unless (memq article unsendable) |
218 |
(gnus-draft-send article))))))) |
(let ((message-sending-message |
219 |
|
(format "Sending message %d of %d..." |
220 |
|
(- total (length articles)) total))) |
221 |
|
(gnus-draft-send article)))))))) |
222 |
|
|
223 |
;;;###autoload |
;;;###autoload |
224 |
(defun gnus-draft-reminder () |
(defun gnus-draft-reminder () |
272 |
`(lambda (arg) |
`(lambda (arg) |
273 |
(gnus-post-method arg ,(car ga)))) |
(gnus-post-method arg ,(car ga)))) |
274 |
(unless (equal (cadr ga) "") |
(unless (equal (cadr ga) "") |
275 |
(message-add-action |
(dolist (article (cdr ga)) |
276 |
`(progn |
(message-add-action |
277 |
(gnus-add-mark ,(car ga) 'replied ,(cadr ga)) |
`(progn |
278 |
(gnus-request-set-mark ,(car ga) (list (list (list ,(cadr ga)) |
(gnus-add-mark ,(car ga) 'replied ,article) |
279 |
'add '(reply))))) |
(gnus-request-set-mark ,(car ga) (list (list (list ,article) |
280 |
'send)))))) |
'add '(reply))))) |
281 |
|
'send))))))) |
282 |
|
|
283 |
(defun gnus-draft-article-sendable-p (article) |
(defun gnus-draft-article-sendable-p (article) |
284 |
"Say whether ARTICLE is sendable." |
"Say whether ARTICLE is sendable." |