Hi, Alain! Alain Bench wrote 31 lines:
> Hello Wolfgang, thank you for the precise report. You are welcome. > On Friday, July 1, 2005 at 3:30:26 PM +0200, Wolfgang Weisselberg wrote: > >| send2-hook . 'my_hdr From: <[EMAIL PROTECTED]>' > > observe: From IS NOT SET! > That is not a bug, things are designed like that. At the time > send2-hooks are triggered, the sender of the currently composed mail is > already fixed. It's too late for changing sender via $from, via > $reverse_name, or even via "my_hdr From:". In fact it's too late for any > "my_hdr". Hmmm. Let me see ... - At the time send2-hook is triggered, the sender is fixed, no way (except <edit-from>) to change it. Ok. - The manual (via F1) says: | send2-hook is matched every time a message is changed, either by | editing it, or by using the compose menu to change its recipients or | subject. send2-hook is executed after send-hook, and can, e.g., be | used to set parameters such as the ``$sendmail'' variable depending on | the message's sender address. which seems true, according to my observation. That looks like the manual schould mention <edit-from>: However, you cannot set "From: " with send2-hook except using 'send2-hook . "push <edit-from><kill-line>[EMAIL PROTECTED]<Enter>"', since send2-hook runs too late for any other method. Otherwise a reader might get the impression that the main difference between send2-hook ("is matched every time a message is changed") and send-hook ("[is] only executed ONCE after getting the initial list of recipients") is how often it's executed. That at least was my motivation for using send2-hook: have From automatically updated if I change recipients. - Yet something *does* happen, for on the next try (recipient2) send2-hook *does* set the recipient. Even though that is a completely new mail, the old one being aborted. Is that really the correct behaviour? To me it looks like data leaking from one mail to another ... > The only way a send2-hook has to change the sender is via > pushing <edit-from>: > | send2-hook . "push <edit-from><kill-line>[EMAIL PROTECTED]<Enter>" > The advantage in return is that a send2-hook pattern can depend on > the sender. Depend on the sender to be what Unchanged by "my_hdr From: " directives, as put into the mail header by the writer, as more-or-less immutable, even if you should run extensive commands in send2-hook? It probably is obvious to you, to me it's not, and maybe it should be documented. -Wolfgang -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]