Gnus development mailing list
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: ding@gnus.org
Subject: Re: separate smtps for my accounts
Date: Fri, 12 Sep 2014 10:08:29 +0800	[thread overview]
Message-ID: <87egvhsi8y.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <87tx4dodsj.fsf@skimble.plus.com>

Sharon Kimble <boudiccas@skimble.plus.com> writes:

> In my gnus setup I have 1 pop3 account, and 3 imap accounts, but only
> one smtp address. How can I have a separate smtp settings so that I am
> able to reply via the address of the email that I've just received?
>
> Thanks
> Sharon.

The details depend a little bit on the exact program you're using for
sending mail, but generally the rigmarole looks like this (I use msmtp):

(defun cg-feed-msmtp ()
  (if (message-mail-p)
      (save-excursion
	(let* ((from
		(save-restriction
		  (message-narrow-to-headers)
		  (message-fetch-field "from")))
	       (account
		(cond
		 ;; I use email address as account label in ~/.msmtprc
		 ((string-match "eric@ericabrahamsen.net" from) "ea")
		 ((string-match "account_two@gmail.com" from) "acc2")
		 ((string-match "more_accounts@domain.org" from) "more"))))
	  (setq message-sendmail-extra-arguments (list '"-a" account))))))

(setq message-sendmail-envelope-from 'header)
(add-hook 'message-send-mail-hook 'cg-feed-msmtp)




  reply	other threads:[~2014-09-12  2:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-12  0:58 Sharon Kimble
2014-09-12  2:08 ` Eric Abrahamsen [this message]
2014-09-12 15:05   ` Jorge A. Alfaro-Murillo
2014-09-13 22:03   ` Sharon Kimble
2014-09-14  2:01     ` Eric Abrahamsen
2014-09-16 18:57       ` Sharon Kimble
2014-09-17  2:17         ` Eric Abrahamsen
2014-09-24 15:24           ` Ted Zlatanov
2014-09-17 12:32         ` Rasmus
2014-09-17  8:37     ` Eric S Fraga

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=87egvhsi8y.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --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).