<<< Date Index >>>     <<< Thread Index >>>

Re: send-hook based on what alternate was used



On Wed, Sep 03, 2003 at 10:55:12PM +0200, Johan Svedberg wrote:
[...]
> I was wondering if someone can come up with a solution to a small
> problem of mine. What I'm looking for is a way to use send-hook's based
> on what From-header (i.e. which one of my $alternates) I happend use.
> Can this even be done?

manual says "the send-hook's are only executed ONCE after getting the initial
list of recipients." Which means that if your From header is set at that
moment then you can match it using ~f. If you set it using the same send-hook
then probably  this would work.

send-hook special 'set my_hdr From: my@alternative'
send-hook '~f my@alternative' onecommand
send-hook '~f my@xxxxxxxxxxxxxxxx' anothercommand

Though I didn't try it.

--
Andrei