From: Arash Esbati <arash@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: How to dynamically select msmtp profile when sending a message?
Date: Thu, 13 Jun 2024 16:35:31 +0200 [thread overview]
Message-ID: <m234pg52rw.fsf@macmutant.fritz.box> (raw)
In-Reply-To: 00aa97e5-f947-45bd-bee7-64716dbaa4d6@app.fastmail.com
"Adham Omran" <lists@adham-omran.com> writes:
> Hey Arash, thank you for your reply, maybe you missed this part in my
> initial message:
>
>>> In my `/etc/msmtprc` configuration I have two accounts.
Yes, I saw that, but I was just guessing; wrong guess.
> I already have two accounts setup and working with the command line.
> Emacs is where I have issues as it does not select the correct account
> from my configuration.
I also have a multiple mail-account setup with Emacs/Gnus/msmtp and my
understanding was that msmtp chooses the account based on the
mail-address. I use message.el for sending messages with:
(setq message-send-mail-function #'message-send-mail-with-sendmail)
(setq send-mail-function #'message-send-mail-with-sendmail)
(setq sendmail-program "/path/to/msmtp")
(setq message-sendmail-f-is-evil nil)
(setq message-sendmail-envelope-from 'header)
and have no problems. For the last 2 forms, you could do:
(setq message-sendmail-f-is-evil t)
(setq message-sendmail-extra-arguments '("--read-envelope-from"))
which should give the same result. Sorry if I'm still missing
something.
Best, Arash
next prev parent reply other threads:[~2024-06-13 14:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-12 21:02 How to dynamically select msmtp profile when sending a message? Adham Omran
2024-06-13 10:18 ` Arash Esbati
2024-06-13 13:32 ` Adham Omran
2024-06-13 14:35 ` Arash Esbati [this message]
[not found] ` <871q506apa.fsf@gilgamesh.mail-host-address-is-not-set>
2024-06-13 17:24 ` Arash Esbati
2024-06-14 5:32 ` Bob Newell
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=m234pg52rw.fsf@macmutant.fritz.box \
--to=arash@gnu.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.