[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Which mail user agent do you use?

Paul Mackinney wrote:

> Could someone post a concrete example of using folder hooks to
> switch the "From: " header depending on which folder you're in?
> I'd like to use the following logic:
>   if current folder is college.mbox
>     send mail from pmack999@college.edu
> 	else
> 	  send mail from paul@mackinney.net

Here's how I would do it:

folder-hook . unmy_hdr *
folder-hook .            my_hdr From: Paul Mackinney <paul@mackinney.net>
folder-hook college.mbox my_hdr From: Paul Mackinney <pmack999@college.edu>

The first line clears all header customizations; the second, with the
folder name specified as ".", sets the default for all folders that
don't have their own hook; the third says that in the folder
"college.mbox", the From: line should be set to use the .edu account.


Reply to: