Discussion Locked

Error Log using a batch file

0 helpful
0 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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?

0 replies

No replies were posted before this discussion closed.

This discussion is closed to new replies.