mutt macro

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Deepak Saxena
Date:  
Subject: mutt macro
On Apr 28 2003, at 14:24, Mike Starke was caught saying:
>
> How can I setup/create a macro in Mutt that
> will change the From: address at the stroke of a key?
>
> I send/receive mail under a variety of domain names,
> and it is very frustrating to forget to change
> that line at times (e.g sending to PLUG requires
> that I have a differant from address than the
> default I have set up...).


I'm not sure if you can exactly what you are asking for,
but what you can do is you can have per-folder hooks
in mutt so that depending on what folder you are in,
you can change from, organization, and other settings.
For example, from my muttrc:

# Remove all hooks when changing folders. VERY IMPORTANT
folder-hook . unmy_hdr *

# Folder hooks for all (.)
folder-hook . 'my_hdr From: '
folder-hook . 'my_hdr Reply-To: '
folder-hook . 'my_hdr Organization: Plexity Networks'
folder-hook . set record="~/Mail/sent-mail"
folder-hook . set signature="~/.sig"

# Folder hooks for happydirt stuff
folder-hook happydirt/* unmy_hdr *
folder-hook happydirt/* 'my_hdr From: '
folder-hook happydirt/* 'my_hdr Reply-To: '
folder-hook happydirt/* 'my_hdr Organization: Happy Dirt Veggie Patch"
folder-hook happydirt/* set record="~/Mail/happydirt/sent"
folder-hook happydirt/* set signature="~/.sig-happydirt"

I have my procmail setup to automatically filter messages to different
folders. If you want to do it on a per message basis, it might be
easier to add macros to your .vimrc to populate 'From' with the
correct info and edit the headers before sending. The mutt webpage
has detailed docs on the folder-hooks and all the settings you
can change. I believe that the order of the hooks matters b/c they
are processed sequenetially.

~Deepak

--
In America, you are free to speak your mind as long as you agree
with the majority opinion.