all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Guilherme Gondim <semente@taurinus.org>
To: help-gnu-emacs@gnu.org
Subject: How to set "From" field based on replied message in Emacs RMAIL using Message package?
Date: Wed, 20 Feb 2013 17:34:29 -0300	[thread overview]
Message-ID: <87hal6k9m2.fsf@taurinus.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1197 bytes --]

Hi there,

I'm trying prepare RMAIL and Emacs to support multiple e-mail
accounts. I already have a solution to use different SMTP servers based
on the *From* field of a e-mail (based on info in EmacsWiki[1]), but I
currently have to set the From field manually.

What I want is to set the From field automatically when replying to
someone in RMAIL (i.e. when replying a e-mail delivered to
account1@example.net, set From in "compose message buffer" to
account1@example.net). I use the Message package as
mail-user-agent. Gnus have a similar feature called
gnus-posting-styles[2].

What I need, exactly, is something like below:

  1. When press `r` or `M-x rmail-reply` on RMAIL summary, look for
  account1@example.net or account2@example.net in the fields `To`, `Cc`,
  `Envelope-To`, `X-Origintal-To` or `Delivered-To` of a replied message
  and store the first one found in some variable;

  2. Already on Message buffer to compose the e-mail, automatically set
  the From field to the previously stored value.

There is a way to perform 1?

Thank you!


[1] http://www.emacswiki.org/emacs/MultipleSMTPAccounts
[2] https://www.gnu.org/software/emacs/manual/html_node/gnus/Posting-Styles.html

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

                 reply	other threads:[~2013-02-20 20:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=87hal6k9m2.fsf@taurinus.org \
    --to=semente@taurinus.org \
    --cc=help-gnu-emacs@gnu.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.