On Thu, 28 Feb 2002, Erik Rothwell wrote: > On Thu, Feb 28, 2002 at 10:28:49AM -0800, Gary Johnson wrote: > > On Thu, Feb 28, 2002 at 11:06:39AM -0500, Rob Reid wrote: > > > > > Maybe it could be made folder specific by tying the send-hook to an alias, or > > > even user+folder@domain, that is only used when emailing user from folder. > > > > You can have a folder-hook set a send-hook, like this: > > > > folder-hook . unhook send-hook > > folder-hook folder1 send-hook . 'my_hdr From: One Me <who@where>' > > folder-hook folder2 send-hook . 'my_hdr From: Another Me <why@me>' > > folder-hook . 'send-hook "~t somebody" "unmy_hdr From:"' > >
> Still, if I'm in a folder & I send to somebody, the send-hook has taken > control *until* I re-enter the folder... then it's reset. Or am I > reading the above wrong? > What I'm trying to do is this: > If I'm in a folder, set my from address for the folder, *unless* I'm > emailing to user@domain, then, use a different address. Ok, if I follow you up to this point, you need to use a send-hook that makes sure that it doesn't match something. send-hook !~t user@domain "my_hdr From: address C" then another send-hook send-hook ~t user@domain "my_hdr From: address whatever" You could embed these send-hooks into a folder-hooks for the appropriate folder, and then it should set up dynamically as you have covered the cases that you mention later in your email. > Now, after using the send hook, I don't want it to persist. I'd like it > to "reset" as it were. I haven't tested my above examples, but they should work. > I can do this with folder hooks -- use address A if in folder A, but, > address B in folder B, or address C by default... but it's the *unless* > exception I can't seem to set. (For instance, folder hooks are read > again when I enter another folder... I can then use a defaults.global to > unset headers before setting them based on folder. If I do the same for > send-hooks, while also using folder-hooks, I cannot use folder-hooks at > all... the send-hooks will always get used. OTOH, if I use a send-hook > in a folder, the folder-hook is not re-asserted on the next send... as: > folder hooks are evaluated only on folder entry, whereas send-hooks are > evaluated on each send.) > Does that make any more sense? So embedding the changes to the send-hooks inside folder-hooks may be what you are looking for then. > What would be nice is something equivalent to Pine's roles, then I could > decide what address to send from when I hit 'm', but, automation based > on address would be superior in my case, if it were possible. Sorry, don't know enough about pine for that to help me as a reference any. :( HTH -- Knute
msg24869/pgp00000.pgp
Description: PGP signature