On theBat! forum I asked previously if theBat! could automatically extract an email address from a file name, and send the file to that address, if the file name was email@emailaddress.com.txt.
I was kindly provided 2 files, sendfile.cmd and sendfile.tpl (shown below) and they worked successfully on my PC desktop. Thank you.
Now I have installed theBat! on a Windows 2003 server and can send emails fine manually. But I have yet to be successful at "automatically extracting an email address from a file name, and send the file to that address, with the 2 files: sendfile.cmd and sendfile.tpl."
I believe I have re-created on the server, the same thing I have working on my PC. But I've changed the paths in the 2 files to match the path in the server. I've scheduled theBat! to start the program:
C:\Documents and Settings\BAT\Sendfile.cmd
I can see the file being activated, but it doesn't work. There is no outgoing or sent mail.
What am I forgetting? What am I missing? What should I look at? Any suggestions would be GREATLY, greatly appreciated.
Sendfile.cmd
For %%i in ("C:\Documents and Settings\TA*.txt") do "C:\Program Files\The Bat!\thebat.exe" /MailT="C:\Documents and Settings\BAT\Sendfile.tpl";A="%%i";To="%%i";S="%%i";Send
Sendfile.tpl
%SetPattRegExp='C:\\Documents and Settings\\BAT\\TA\\(.*?)~~(.*?)\.txt'%-
%RegExpBlindMatch='%To'%-
%ModifyOnce(To)%-
%SetHeader(To,%SubPatt='1')%-
Hi %ABToFirstName="%ToFName",
I was kindly provided 2 files, sendfile.cmd and sendfile.tpl (shown below) and they worked successfully on my PC desktop. Thank you.
Now I have installed theBat! on a Windows 2003 server and can send emails fine manually. But I have yet to be successful at "automatically extracting an email address from a file name, and send the file to that address, with the 2 files: sendfile.cmd and sendfile.tpl."
I believe I have re-created on the server, the same thing I have working on my PC. But I've changed the paths in the 2 files to match the path in the server. I've scheduled theBat! to start the program:
C:\Documents and Settings\BAT\Sendfile.cmd
I can see the file being activated, but it doesn't work. There is no outgoing or sent mail.
What am I forgetting? What am I missing? What should I look at? Any suggestions would be GREATLY, greatly appreciated.
Sendfile.cmd
For %%i in ("C:\Documents and Settings\TA*.txt") do "C:\Program Files\The Bat!\thebat.exe" /MailT="C:\Documents and Settings\BAT\Sendfile.tpl";A="%%i";To="%%i";S="%%i";Send
Sendfile.tpl
%SetPattRegExp='C:\\Documents and Settings\\BAT\\TA\\(.*?)~~(.*?)\.txt'%-
%RegExpBlindMatch='%To'%-
%ModifyOnce(To)%-
%SetHeader(To,%SubPatt='1')%-
Hi %ABToFirstName="%ToFName",