Subject: bug#52205: Allow configuring multiple mail accounts for smtpmail.el

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 01 Dec 2021 05:08:27 +0100

Philip Kaludercic <[email-masked]> writes:

> the below patch should allow for multiple mail accounts being configured
> for smtpmail.el, without having to use tricks like
> X-Message-SMTP-Method, that only work when the MUA also inserts them at
> the right time.

The problem is that there's no limit to how people want to configure
their outgoing mail.

> +         (server (alist-get envelope-from smtpmail-smtp-server-alist
> +                            (list smtpmail-smtp-server)
> +                            nil #'string=))

And using just the envelope-from might be correct for your use case, but
it's not, in general, very useful.

If we want to add something like this to smtpmail, it has to allow a
full range of customisations for how to determine the server...  and
that's best done in the MUA, in my opinion.  Which is why it's
implemented via a header so the MUA can do this.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no