-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday, April 27 at 10:48 PM, quoth Albert Shih: >Another question : > > > Some people send me mail directly to me (instead helpdesk), when I > answer it, I put «helpd...@mycompagny» in CC: > > Is they are any solution to put automatically in this situation the > reply-to at helpd...@mycompagny too ? > >I've try send2-hook but it's not working.
When you use my_hdr, that only sets up the headers for new messages, so it only works on the "current" message if you trigger it just before the message is created (i.e. via send-hook). What you would need to do instead is use the <edit-reply-to> function. The only problem with this is that there's no way of preventing the send2 hook from creating an infinite loop. Once you change the message via <edit-reply-to>, all the send2-hooks will get re-evaluated and potentially re-triggered, which could cause trouble. For example, this would cause an infinite loop: send2-hook '~C helpd...@mycompany' \ '<edit-reply-to><kill-line>helpd...@mycompany<enter>' Now, you CAN do this if you create a kind of shortcut, like so: send2-hook '~C fixhelpdesk' \ '<edit-cc><kill-line>helpd...@mycompany<enter><edit-reply-to><kill-line>helpd...@mycompany<enter>' Thus, set your CC to fixhelpdesk, and mutt will alter the CC and the reply-to. The reason that works is because after you change the message, the hook won't trigger again. ~Kyle - -- UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. -- Doug Gwyn -----BEGIN PGP SIGNATURE----- Comment: Thank you for using encryption! iEYEARECAAYFAkn2KjEACgkQBkIOoMqOI17WoACfUry3e3k0UanEb3MHEsOleg0d en8AoO0gIHa09KsFvOlOURuE957FV2dx =N/LC -----END PGP SIGNATURE-----