[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to dynamically select msmtp profile when sending a message?
From: |
Arash Esbati |
Subject: |
Re: How to dynamically select msmtp profile when sending a message? |
Date: |
Thu, 13 Jun 2024 16:35:31 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
"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