Re: Automatically fill TO: based on folder
On 2008-08-27, steve <dlist@xxxxxxxxxx> wrote:
> Hi all,
>
> When creating a new message I would like mutt to fill the TO: field
> based on the directory in which I am curretly in.
>
> Say I'm in
>
> Familly/joe
>
> (maildir format)
>
> and I press m, mutt should put joe's address in the TO: field.
>
> Is this possible? If yes how can I achieve this?
Yes. Here's an example of what I do so that I can address messages
to the mailing list corresponding to the folder I'm in by typing
'M':
folder-hook +Incoming/mutt-users \
'macro index,pager M "<mail>mutt-users^M^M" "mail to list"'
The second ^M answers the "Cc: " prompt so that the first thing I
see after typing 'M' is the "Subject: " prompt. I have one such
folder-hook for each folder that receives mail from a list. In this
example, "mutt-users" is an alias for "mutt-users@xxxxxxxx".
Regards,
Gary