@echo off
set count=0
:loop
if "%1"=="" goto :endloop
shift
set /a count+=1
goto :loop
:endloop
IF EXIST d:\alarme\mailinhalt.txt goto next
echo Am %date% um %time:~0,8% >> d:\alarme\mailinhalt.txt
echo %* >> d:\alarme\mailinhalt.txt
d:\alarme\blat.exe -install 127.0.0.1 EMAIL
d:\alarme\blat.exe "d:\alarme\mailinhalt.txt" -to EMAIL -server 127.0.0.1 -u EMAIL -pw PASSWORD -debug -timestamp -log d:\alarme\versandlog.txt -subject "Alarmierung - %0%"
del d:\alarme\mailinhalt.txt
exit
:next
echo Am %date% um %time:~0,8% %* >> d:\alarme\mailinhalt2.txt
d:\alarme\blat.exe -install 127.0.0.1 EMAIL
d:\alarme\blat.exe "d:\alarme\mailinhalt2.txt" -to EMAIL -server 127.0.0.1 -u EMAIL -pw PASSWORD -debug -timestamp -log d:\alarme\versandlog.txt -subject "Alarmierung - %0%"
del d:\alarme\mailinhalt2.txt
exit