[johan@xxxxxxxxxxxxxx: Re: send-hook based on what alternate was used]
----- Forwarded message from Johan Svedberg <johan@xxxxxxxxxxxxxx> -----
Sender: owner-mutt-users@xxxxxxxx
From: Johan Svedberg <johan@xxxxxxxxxxxxxx>
Subject: Re: send-hook based on what alternate was used
Date: Fri, 5 Sep 2003 12:35:01 +0200
Message-ID: <20030905123136.GA61cbb.johan@xxxxxxxxxxxxxx>
User-Agent: Mutt/1.4.1i
To: mutt-users@xxxxxxxx
Mail-Followup-To: mutt-users@xxxxxxxx
* Sep 05 09:40 Andrei A. Voropaev <avorop@xxxxxxx>:
> 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.
Yes. This is what my tests indicate aswell. Perhaps someone more
familiar with the code can comment on this?
--
Johan Svedberg, johan@xxxxxxxxxxxxxx, http://johan.svedberg.pp.se/
----- End forwarded message -----