Hey das funktioniert auch nicht!
Er hat dann keinen Text zum Übermitteln!
Ich probiere es jetzt mal so!
@Echo off
if exist "d:\baycom\poc32\status.txt" goto ende
if "%2"=="0" set text=FW-Xy
if "%2"=="1" set text=FW-xy-kleinalarm
if "%2"=="2" set text=FW-XY-Reserve
if "%2"=="3" goto Ende (FW-xy-Probealarm)
cls
Echo Alarmierung
echo "Alarm läuft" > status.txt
echo %3> d:\temp.txt
ansiasci d:\temp.txt d:\Alarm.txt /an /o
find /c "BMA" d:\Alarm.txt
if %errorlevel%==0 goto ende
REM if %errorlevel%==1 echo Stichwort nicht enthalten
find /c "Ölspur" d:\Alarm.txt
if %errorlevel%==0 goto ende
REM if %errorlevel%==1 echo Stichwort nicht enthalten
find /c "Türöffnung" d:\Alarm.txt
if %errorlevel%==0 goto ende
REM if %errorlevel%==1 echo Stichwort nicht enthalten
find /c "Brandmeldeanlage" d:\Alarm.txt
if %errorlevel%==0 goto ende
REM if %errorlevel%==1 echo Stichwort nicht enthalten
find /c "Probealarm" d:\Alarm.txt
if %errorlevel%==0 goto ende
REM if %errorlevel%==1 echo Stichwort nicht enthalten
find /c "Öl auf Strasse" d:\Alarm.txt
if %errorlevel%==0 goto ende
REM if %errorlevel%==1 echo Stichwort nicht enthalten
find /c "Proberuf" d:\Alarm.txt
if %errorlevel%==0 goto ende
REM if %errorlevel%==1 echo Stichwort nicht enthalten
d:\baycom\poc32\clemail.exe -to xxxx@gmx.de -from xxxy@gmx.de -fromname %text% -smtpserver mail.gmx.de -popserver pop.gmx.de -popuser xxyx -poppass xyxyxy -subjectfile d:\Alarm.txt -bodyfile d:\alarm.txt
wait 15
:ende
del status.txt
___________________________________-
Scheint ja dann doch nicht soooooooooo einfach zu sein!
Danny