Hooks for sending/replying to set a custom header

Subject: Hooks for sending/replying to set a custom header

Date: Thu, 03 Oct 2024 00:00:56 -0700

To: notmuch@notmuchmail.org

Cc:

From: Xiyue Deng


Hi,

Let me start by saying that I have been enjoying notmuch recently and
wish I had tried notmuch much earlier.

I do encounter a small issue on managing multiple email accounts: I set
`message-default-mail-headers' with the SMTP settings and email address
so that smtpmail can send the mail through my specified email address,
and would like to change this setting based on which address I'm sending
from.  However I'm having trouble finding the best place to set this in
notmuch when sending/replying.  AIUI notmuch does not really have the
concept of mail account, so this may require some manual handling.  I
tried to `re-search-forward' in notmuch-message-mode-hook for the `From:
' header, but at that stage the buffer seems to be empty.  I found one
Emacs tip that can set the sender to a fix address for all mails, but
not any customizations based on the sender.  Basically, I'm looking for
something like `gnus-posting-style' in Gnus or context change hook in
mu4e.  Is there a way to achieve this (or maybe I am missing something)?

Thanks in advance, and thanks for the great work on notmuch!
-- 
Xiyue Deng
signature.asc (application/pgp-signature)
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: