convtech2
asked on
Windows batch file to telnet to SMTP server and send email
I have a batch file that telnets to a SMTP server, and emails error codes on some SQL backups.
Everything works except where you're supposed to send a . on a line by itself.
It doesn't seem to recognize the '.', so it doesn't get to the quit command.
If I watch the script, I can put the . in with the keyboard, but it defeats the purpose of having a scheduled task.
Without getting into a 3rd party software, would anybody have any suggestions?
Everything works except where you're supposed to send a . on a line by itself.
It doesn't seem to recognize the '.', so it doesn't get to the quit command.
If I watch the script, I can put the . in with the keyboard, but it defeats the purpose of having a scheduled task.
Without getting into a 3rd party software, would anybody have any suggestions?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
the crlf under the . doesn't work.
ASKER
I'll try Blat
For example.
..your code..
.
<end of script>
Also, i would use NetCat, (nc.exe), rather than telnet.