0

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?

Edited by Labdabeta: smileys

1
Contributor
1
Reply
2
Views
6 Years
Discussion Span
Last Post by Labdabeta
0

Sorry for the double post. I would just like to add that I have indeed tried this:

(echo helo; echo "mail from:(my email address)"; echo "rcpt to:(my email address)"; echo DATA; echo SUBJECT:(my subject); echo "(my message)";echo .)|telnet (My email smtp) 25

And it failed :(

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.