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

Re: send-hook based on what alternate was used



On Thu, Sep 04, 2003 at 09:26:43AM +0200, Andrei A. Voropaev wrote:
> 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.

Well I tried it. It appears that send-hook does not understand '~f' pattern.
At least my version of mutt complains "unknown variable". Well. The one who
wrote mutt can give better answer of course :) I guess that the pattern works
only on the original receipients specified in To field. All the other fields
added by previous send-hook are not considered.

--
Andrei