From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.help Subject: Re: Multiple "outgoing" email accounts. Date: Sat, 08 Feb 2014 14:14:51 +0800 Message-ID: <87txcaku5g.fsf@ericabrahamsen.net> References: <87eh3g0yro.fsf@gmail.com> <87bnykm0ja.wl%hskuhra@eumx.net> <87bnyj2946.fsf@gmail.com> <87sirumdxn.fsf@moondust.localdomain> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1391839984 16807 80.91.229.3 (8 Feb 2014 06:13:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Feb 2014 06:13:04 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Feb 08 07:13:12 2014 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 1WC1A8-0007ee-0Y for geh-help-gnu-emacs@m.gmane.org; Sat, 08 Feb 2014 07:13:12 +0100 Original-Received: from localhost ([::1]:45306 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WC1A7-0003RD-I9 for geh-help-gnu-emacs@m.gmane.org; Sat, 08 Feb 2014 01:13:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42819) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WC19s-0003Pn-2s for help-gnu-emacs@gnu.org; Sat, 08 Feb 2014 01:13:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WC19m-0001fX-MD for help-gnu-emacs@gnu.org; Sat, 08 Feb 2014 01:12:56 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:47824) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WC19m-0001fT-Fp for help-gnu-emacs@gnu.org; Sat, 08 Feb 2014 01:12:50 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WC19j-0007KB-Nn for help-gnu-emacs@gnu.org; Sat, 08 Feb 2014 07:12:47 +0100 Original-Received: from 123.122.35.89 ([123.122.35.89]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 08 Feb 2014 07:12:47 +0100 Original-Received: from eric by 123.122.35.89 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 08 Feb 2014 07:12:47 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 51 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 123.122.35.89 User-Agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:2K162JZFQN4cW3fnbrlYGyOPtW8= 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:95972 Archived-At: nljlistbox2@gmail.com (N. Jackson) writes: > "William G Gardella" writes: >> N.B. that in emacs24, you can also specify which SMTP server to use >> for message-mode on a per message basis with an >> "X-Message-SMTP-Method:" header, e.g. >> >> X-Message-SMTP-Method: smtp smtp.foo.org 465 >> >> This eliminates much of the need for the setting of individual >> smtpmail-* variables in these multiple accounts configurations for >> message-mode MUAs like mu4e and Gnus. This technique also lets you >> switch between use of smtpmail and use of your system's local sendmail >> binary: >> >> X-Message-SMTP-Method: sendmail >> >> See (info "(message) Mail Variables") for more info. > > I've been looking at using this header for in my set up for multiple > email accounts and I find myself with questions that I haven't found the > answers to yet in the documentation: > > !. Does the header get removed before the mail is sent? > > 2. Can one omit the port number and leave that to be retrieved from the > .authinfo file? > > 3. Is there a command to insert the X-Message-SMTP-Method header? > > 4. When entering the value for the X-Message-SMTP-Method header, is > there a way to use completion to select from available smtp servers, or > from the entries in .authinfo? > > It would seem like an excessive amount of work, and error prone, to type > in something like > > X-Message-SMTP-Method: smtp smtp.fsf.org 587 other-user > > every time I want to send an email. I think the idea is to use posting styles to tell gnus to set up the appropriate STMP method header, depending on your From address. As far as I know, however, that means you can't cycle the From address in the message-mode buffer and have it do the right thing. You'd have specify the From address before the message buffer is set up. I'm looking at this now, and I'll probably set up a wrapper around compose-mail. I certainly hope the header gets removed... E