General discussion

Locked

Error Log using a batch file

By ma_sami ·
Hi,

I have a batch file which seraches for a text file and send as email attachement using smtp client sendemail.exe,below is the code for same.

for /f "tokens=* delims= " %%a in ('dir/b *.txt') do (set str=%%a)

start sendemail -f frommail@domain.com -t tomail@domain.com -u Subject -m Message Body -s mail.domain.com -a %str% -xu UserName -xp Password

How can we create a log file and save the result either success or failure along with the error message?

This conversation is currently closed to new comments.

0 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Back to Software Forum
0 total posts (Page 1 of 1)  

Related Discussions

Related Forums