unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Mark Walters <markwalters1009@gmail.com>
To: David Belohrad <david@belohrad.ch>,
	Keith Amidon <camalot@picnicpark.org>,
	notmuch@notmuchmail.org
Subject: Re: sending email using different server for different 'From:' field
Date: Wed, 03 Sep 2014 09:31:55 +0100	[thread overview]
Message-ID: <87egvtds04.fsf@qmul.ac.uk> (raw)
In-Reply-To: <uaxbnqxdvh8.fsf@beesknees.cern.ch>


Hi

On Wed, 03 Sep 2014, David Belohrad <david@belohrad.ch> wrote:
> oukej. this seems to be exactly what I'm looking for. Is there a way how
> to 'cycle' in notmuch different From: fields? I'd need to setup like 3
> addresses, each of them with different signatures and be able to easily
> switch between them....

You might finding setting notmuch-always-prompt-for-sender to 't is
what you want (you can set if in customise or directly)

This prompts you for the sender address and takes options from your
notmuch config file (that is from user.primary_email and
user.other_email from .notmuch-config) so will quite possibly just work.


>>
>> (defun kea/message-select-mail-dest ()
>>   (cond ((string-match "<kea@x.com>"
>>                        (message-field-value "From"))
>>          (kea/send-mail-with-x))
>>         (t
>>          (kea/send-mail-with-y))))
>>
>> (kea/send-mail-with-y)
>> (add-hook 'message-send-hook 'kea/message-select-mail-dest)

I will also mention an alternative approach to using hooks here. You
could customise message-send-mail-function to be your own function which
let binds the appropriate send-mail settings and have that call the
actual send-mail function (eg message-send-mail-with-sendmail)

Best wishes

Mark

  reply	other threads:[~2014-09-03  8:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-02 12:26 sending email using different server for different 'From:' field David Belohrad
2014-09-02 14:35 ` Keith Amidon
2014-09-03  7:16   ` David Belohrad
2014-09-03  8:31     ` Mark Walters [this message]
2014-09-05 21:47       ` David Belohrad

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

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87egvtds04.fsf@qmul.ac.uk \
    --to=markwalters1009@gmail.com \
    --cc=camalot@picnicpark.org \
    --cc=david@belohrad.ch \
    --cc=notmuch@notmuchmail.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 public inbox

	https://yhetil.org/notmuch.git/

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 read-only IMAP folder(s) and NNTP newsgroup(s).