<<< Date Index >>>     <<< Thread Index >>>

Re: execute command while new mail arrives



* Fred Thiele <ferdy_news@xxxxxx> [2005-03-08 08:51:49 +0100]:

> * Michael Tatge <Michael.Tatge@xxxxxx> [2005-03-08 00:57:22 +0100]:
> 
> > * On Mon, Mar 07, 2005 Fred Thiele (ferdy_news@xxxxxx) muttered:
> > > I want to have mutt executing a command if it detects a new mail at
> > > the remote imaps server which it connects to.
> > 
> > That is not possible atm.
> 
> Well, it can't be that hard. If a new mail arrives also a beep is
> issued. There must be a way to execute a command too. I guess I will
> have to look at the sources myself. But thank you anyway.

In case someone is interested in: I made a very, very dirty hack in
mutt-cvs sources to accomplish my wish. I grep'd for beep() and
located it in curs_main.c. I simply exchanged the beep() with an
pure 
 
    system("osd_print newmail &"); 

which works fine although it is badly hacked. Don't try this at
home, children ;-)

May be someone knows something about how to extract to "From:"-Tag
out of the new mail?! That would be a nice additional gimmick.

-- 
Best regards,

Fred Thiele