This a more elaborate example, Example Config File DB is simpler

CreateProcess.CommandLine="c:\Program Files\Adobe\Acrobat\Reader\AcroRd32.exe" /t "e:\somedir\facturen\im%VD_Dir_Name%\sf%VD_DAT_IM%.pdf" "%Destination%"
CreateProcess.CurrentDirectory=c:\Program Files\Adobe\Acrobat\Reader\
1.CreateProcess.CommandLine="C:\Program Files\blat32\blat.exe" -f fromadres@somewher.net -server mail.somewer.net -attach "E:\somedir\im%VD_Dir_Name%\sf%VD_DAT_IM%.pdf" -to "%Destination%" -body "%message%" -s "Offerte %offertenum%"
1.CreateProcess.CurrentDirectory=C:\log
CreateProcess.Environment="Path=C:\WINNT\system32;C:\WINNT", "systemroot=c:\winnt","PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.JS;.WS;.DLL","spAction=%Action%", "spDAT_IM=%VD_DAT_IM%", "spSTARTCOUNT=%startcount%", "spDateTime=%timestamp%"
CreateProcess.Priority=0
CreateProcess.MaxProcesses=1
CreateProcess.MaxQueueCount=5
Timer.Interval=10000
Timer.IntervalOnStart=100
Timer.WaitOnQueueFull=200
# change this logfile to reflect your preference
LogFile.FileName=C:\log\PrintMail.log
LogFile.Active=TRUE
LogFile.SizeLimit=200000
LogFile.AutoSave=FALSE
LogFile.Verbosity=1
DeleteAfterRun=TRUE
DeleteAfterRunAlways=FALSE
RetryFileOnFail=TRUE
#New options
OnlyProcessKnownVars=FALSE
Connectstring=Provider=SQLOLEDB;Server=Databaseserver;Database=somedatabase;UID=user;PWD=password;
BaseSQL=Select top 1 act as Action, dat_im as VD_DAT_IM, dest as Destination, id as UniqueID from database1..action where status=0 and act='print'
QueueSQL=update database1..action set status=1 where id = %UniqueID%
StartSQL=update database1..action set status=2 where id = %UniqueID%
StopSQL=update database1..action set status=10 where id = %UniqueID%
ErrorSQL=update database1..action set status=99 where id = %UniqueID%
BaseSQL1=Select top 1 ac.act as Action, ac.dat_im as VD_DAT_IM, ac.dest as Destination, ac.message, ac.id as UniqueID, doc.dat_008 as offertenum from database2..action ac join offerteseas01..f04 doc on ac.dat_im = doc.dat_im where status=0 and act='sendmail'
1.QueueSQL=update database2..action set status=1 where id = %UniqueID%
1.StartSQL=update database2..action set status=2 where id = %UniqueID%
1.StopSQL=update database2..action set status=10 where id = %UniqueID%
1.ErrorSQL=update database2..action set status=99 where id = %UniqueID%

# currentdate
# currenttime
# timestamp
# mytimestamp 
freetimestamp=yyyymmdd"T"hh":"nn":"ss





Gesponsorde koppelingen