From: dsg@mitre.org (David S. Goldberg)
Cc: ding@gnus.org
Subject: Re: autoreply function?
Date: 21 Jul 1998 15:25:47 -0400 [thread overview]
Message-ID: <m1bhg0b3t1g.fsf@blackbird.mitre.org> (raw)
In-Reply-To: Stefan Waldherr's message of "21 Jul 1998 20:42:41 +0200"
[-- Attachment #1: Type: text/plain, Size: 374 bytes --]
It's not exactly what you want, but here's a starting point. It uses
forward instead of reply because that was desirable for the project I
designed it for (a sort of moderator function). It should be pretty
easy to tailor it to your needs.
--
Dave Goldberg
Post: The Mitre Corporation\MS B305\202 Burlington Rd.\Bedford, MA 01730
Phone: 781-271-3887
Email: dsg@mitre.org
[-- Attachment #2: Type: text/plain, Size: 1124 bytes --]
(defun auto-reject-message ()
"Forward to the current message back to its originator. Prompt for
a rejection message file to include."
(interactive)
(call-interactively 'gnus-summary-show-article)
(let ((auto-rejection-file
(completing-read "Rejection File: "
(mapcar 'list
(directory-files
auto-rejection-dir nil
(regexp-quote auto-rejection-file-prefix)))
nil t auto-rejection-file-prefix))
(auto-rejected-user (save-excursion
(set-buffer gnus-article-buffer)
(or (message-fetch-field "Reply-To")
(message-fetch-field "From")))))
(if (= (length auto-rejection-file) 0)
(setq auto-rejection-file auto-default-rejection-file))
(if (not auto-rejected-user)
(error "Error in message structure: no Reply-To or From lines."))
(gnus-summary-mail-forward t)
(goto-char (point-min))
(search-forward mail-header-separator nil 'limit nil)
(insert "\n")
(insert-file-contents (concat auto-rejection-dir auto-rejection-file))
(goto-char (point-min))
(message-goto-to)
(insert auto-rejected-user)
(message-send-and-exit)))
next prev parent reply other threads:[~1998-07-21 19:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-07-21 18:42 Stefan Waldherr
1998-07-21 19:25 ` David S. Goldberg [this message]
1998-07-22 4:35 ` Paul Franklin
1998-07-24 8:29 ` SL Baur
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1bhg0b3t1g.fsf@blackbird.mitre.org \
--to=dsg@mitre.org \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).