I have the following working fine from the command line:
telnet (my email smtp) 25
helo
mail from:(my email address)
rcpt to:(my email address)
DATA
SUBJECT:(my subject)
(my message)
.
This is sending me an email. My problem is that I need to emulate all of this from either a c++ file or a batch file. How can I pass instructions to telnet from a batch file?