--- Begin Message ---
Subject: |
Is there a better way to reply "Disposition-Notification-To"? |
Date: |
Thu, 28 Jun 2007 21:33:00 -0700 |
User-agent: |
G2/1.0 |
I want to reply messages with a "Disposition-Notification-To" field in
the header automatically.
Here is a working solution, is there a better soloution?
(add-hook 'gnus-startup-hook
'(lambda ()
(setq gnus-visible-headers
(concat "^Disposition-Notification-To:\\|"
gnus-visible-headers))))
(eval-after-load "gnus-sum"
'(add-hook 'gnus-mark-article-hook 'my-check-notification))
(defun my-check-notification ()
(if (gnus-summary-article-unread-p (gnus-summary-article-number))
(add-hook 'gnus-article-prepare-hook 'my-reply-notification)
(remove-hook 'gnus-article-prepare-hook 'my-reply-notification)))
(defun my-reply-notification ()
(save-excursion
(save-restriction
(message-narrow-to-headers)
(if (and (mail-fetch-field "disposition-notification-to")
(yes-or-no-p "Really send the dispositon notification?"))
(progn (gnus-summary-reply)
(insert "Got it, thanks.")
(message-send-and-exit))))))
--- End Message ---
--- Begin Message ---
Subject: |
confirm 00070bd9378b3f2d8d72a65299f80be4d85556f6 |
If you reply to this message, keeping the Subject: header intact,
Mailman will discard the held message. Do this if the message is
spam. If you reply to this message and include an Approved: header
with the list password in it, the message will be approved for posting
to the list. The Approved: header can also appear in the first line
of the body of the reply.
--- End Message ---