Always CC specific messages to some people (send-hook and my_hdr)

Raphaël Fournier-S'niehotta raphael at raphaelfournier.net
Thu Nov 12 16:58:01 UTC 2020


Hello fellow mutt users,

When emailing to someone with mutt, I would like to have my messages automatically CC'd to someone. Typically, we are a team of academics working with a student, and I would like my exchanges with the student to be sent to others.

Mutt aliases seems to be on a "per field" basis. So I could use it to put my coworkers in an alias, but they would be in the "To:" field, not "CC". 

I wanted to use a send-hook and the my_hdr variable, but it works for other fields (such as adding a "Organization: A Really Big Company, Anytown, USA", from the manual). But not for the CC field (the manual says: "note that my_hdr commands which modify recipient headers, or the message's subject, don't have any effect on the current message when executed from a send-hook").

Is there a workaround? Perhaps with the recent muttlisp?

Setting edit_headers to yes for all my messages(and having a nice macro in my editor) would not help, since I'd like such a behavior for only a fraction of my communication. 

Thanks in advance!
-- 
Raphaël Fournier-S'niehotta
http://raphael.fournier-sniehotta.fr/apropos



More information about the Mutt-users mailing list