@Echo off
if exist "d:\baycom\poc32\status.txt" goto ende
if "%2"=="0"
goto ende
if "%2"=="1"
goto ende
if "%2"=="2"
goto ende
if "%2"=="3" set text=DAU Stoerung
cls
Echo Alarmierung
echo "Alarm läuft" > status.txt
echo %3> d:\temp.txt
ansiasci d:\temp.txt d:\Alarm.txt /an /o
d:\baycom\poc32\clemail.exe -to
XXXX@gmx.de -from
dXYX@gmx.de -fromname %text% -smtpserver mail.gmx.de -popserver pop.gmx.de -popuser 000000 -poppass XXXXX -subjectfile d:\Alarm.txt -bodyfile d:\alarm.txt
wait 30
del status.txt
:ende