Josh Huber <[EMAIL PROTECTED]> wrote on Wed, 25 Oct 2000:
> I'm using the following rules to differentiate between internal work
> email and external email.  I'd like however, to be able to bind a key
> (for example, 'M') to mean send but always use my work email address
> as the From: header.

Well, here's a suggested solution:
1) put all your send-hook commands in a separate muttrc-style file
2) make "M" into a macro that
   - does "unhook send-hook"
   - sets up your From header (my_hdr From ... or set from=...)

Then you also need some method to restore the settings.  The easiest
solution would be to set up a macro that just reads the send-hook file
again, and undoes whatever settings you did in the M-macro.  But that's
not automatic.

If you want to automatically restore the settings once that email has
been finished, it does get quite tricky.  There's no way to make a macro
that will "do this, then send email, and after the 'send email' step has
completed, do this".  But, there is only a limited amount of ways you
can get out of the compose menu.  You just have to create macros for all
the possible exit keys in the compose menu, that restore your usual
setup.  They could also un-macro all the compose menu bindings, although
that's strictly speaking not necessary (it won't hurt to leave them in
every time).


I hope this helps,
Mikko
-- 
// Mikko Hänninen, aka. Wizzu  //  [EMAIL PROTECTED]  //  http://www.iki.fi/wiz/
// The Corrs list maintainer  //   net.freak  //   DALnet IRC operator /
// Interests: roleplaying, Linux, the Net, fantasy & scifi, the Corrs /
It really is just the little things that bug a person.

Reply via email to