GNU bug report logs - #52205
Allow configuring multiple mail accounts for smtpmail.el

Previous Next

Package: emacs;

Reported by: Philip Kaludercic <philipk <at> posteo.net>

Date: Tue, 30 Nov 2021 19:46:02 UTC

Severity: normal

Tags: patch

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #41 received at 52205 <at> debbugs.gnu.org (full text, mbox):

From: Philip Kaludercic <philipk <at> posteo.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 52205 <at> debbugs.gnu.org
Subject: Re: bug#52205: Allow configuring multiple mail accounts for
 smtpmail.el
Date: Sat, 18 Dec 2021 13:45:42 +0000
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Philip Kaludercic <philipk <at> posteo.net> writes:
>
>>> Or we could add a command like `message-update-smtp-method-header' and
>>> people could call that (or add it to their hooks) after altering their
>>> From (or whatever) headers.
>>
>> So if the mechanism is supposed to be kept general (instead of just
>> checking the From header), how would this differ from the already
>> existing message-send-mail-hook?
>
> How a command would differ from a hook?  I'm not sure I understand the
> question.

Oh, sorry I misunderstood your suggestion.  So you are thinking of
something that would be configured like:

--8<---------------cut here---------------start------------->8---
;; `message-server-alist' would match the From header[0] if it is a string,
;; or call a function in the current message buffer if it is a function.
(setq message-server-alist
      '(("foo <at> mail.com" . "smtp.mail.com")
        ("bar <at> post.de" . "post-spuep.de")))

(add-hook 'message-send-mail-hook #'message-update-smtp-method-header)
--8<---------------cut here---------------end--------------->8---

If so, then couldn't the add-hook just be dropped, and message always
checks message-server-alist before sending a message?

[0] Using From is probably not enough, e.g. when you try to resend a message.

-- 
	Philip Kaludercic




This bug report was last modified 2 years and 307 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.