From: Matthew King <matthew.king@monnsta.net>
Subject: Lisp recipe to set From header
Date: Fri, 27 Jan 2006 21:34:53 +0000 [thread overview]
Message-ID: <878xt1xsle.fsf@knight.monnsta.net> (raw)
I have the following:
;;; Set From header based on To header
(setq gnus-posting-styles
'(("nn.+:"
(From (save-excursion
(set-buffer gnus-article-buffer)
(message-fetch-field "to"))))))
Which, as the comment says, sets the From header to be that of the
previous mail's To header. I have problems with my address being in the
Cc header instead or with there being more than one address in To, but
this is not important.
What I really want to do is only set the From address to be one from a
pre-set list and to fall back on user-mail-address if there is no match.
I don't know anywhere near enough lisp to write this though, so how
would I go about doing this?
Matthew
--
I must take issue with the term "a mere child," for it has been my
invariable experience that the company of a mere child is infinitely
preferable to that of a mere adult.
-- Fran Lebowitz
next reply other threads:[~2006-01-27 21:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-27 21:34 Matthew King [this message]
2006-01-27 22:12 ` Sébastien Kirche
2006-01-27 22:39 ` David Z Maze
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=878xt1xsle.fsf@knight.monnsta.net \
--to=matthew.king@monnsta.net \
/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).