From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Guilherme Gondim Newsgroups: gmane.emacs.help 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 Message-ID: <87hal6k9m2.fsf@taurinus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1361395523 15976 80.91.229.3 (20 Feb 2013 21:25:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Feb 2013 21:25:23 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 20 22:25:45 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U8HAc-0003ua-Sx for geh-help-gnu-emacs@m.gmane.org; Wed, 20 Feb 2013 22:25:43 +0100 Original-Received: from localhost ([::1]:43251 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8GNT-000167-CE for geh-help-gnu-emacs@m.gmane.org; Wed, 20 Feb 2013 15:34:55 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:58190) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8GNN-000162-Vt for help-gnu-emacs@gnu.org; Wed, 20 Feb 2013 15:34:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U8GNJ-00039z-Cg for help-gnu-emacs@gnu.org; Wed, 20 Feb 2013 15:34:49 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:45777) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8GNJ-00039e-5n for help-gnu-emacs@gnu.org; Wed, 20 Feb 2013 15:34:45 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1U8GNZ-0002Uk-Cn for help-gnu-emacs@gnu.org; Wed, 20 Feb 2013 21:35:01 +0100 Original-Received: from 201.80.84.246 ([201.80.84.246]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Feb 2013 21:35:01 +0100 Original-Received: from semente by 201.80.84.246 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Feb 2013 21:35:01 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 46 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 201.80.84.246 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:TNJ50MCEdisQ6ccGWbz50Kv3pOk= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:89200 Archived-At: --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlElM1YACgkQ4BvRMI1mi6XZoACdGCVwepZ6wJJCPA6nGhfYsQ7R WpIAni9J3D9jeseozIri64RjTqPL2MId =aUd8 -----END PGP SIGNATURE----- --=-=-=--