@echo off
rem -- Run Mutt --
rem -- by KARASZI Istvan

rem -- set USER=%USERNAME%
rem -- set HOME=%USERPROFILE%
set USER=Administrator
set HOME=C:\Documents and Settings\%USER%
rem -- set MAIL=%HOME%\mailbox
rem -- set EMAIL=
rem -- set REPLYTO=
rem -- set LANG=
rem -- set TEMP=C:\TEMP
rem -- set EDITOR=edit %s
set MUTT_ROOT=C:\Progra~1\mutt
set MUTT_BIN=bin\mutt.exe

if exist "%MUTT_ROOT%\%MUTT_BIN%" goto havemutt
echo "%MUTT_ROOT%\%MUTT_BIN%" not found
goto eof

:havemutt
if .%OS%==.Windows_NT goto ntaction

rem -- for Win95 collect the arguments in MUTTARGS
set MUTTARGS=
:loopstart
if .%1==. goto loopend
set MUTTARGS=%MUTTARGS% %1
shift
goto loopstart

:loopend
%MUTT_ROOT%\%MUTT_BIN% %MUTTARGS%
set MUTTARGS=
goto eof

:ntaction
rem -- for WinNT we can use %*
%MUTT_ROOT%\%MUTT_BIN% %*

:eof
