Mixing BATCH with Telnet

Stuff that don´t fit in the other categories.
Post Reply
User avatar
JohnB
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 191
Joined: 13 Mar 2009, 17:00
15
Contact:

Mixing BATCH with Telnet

Post by JohnB »

So I came across this http://www.webdigi.co.uk/blog/2009/how- ... -an-email/" onclick="window.open(this.href);return false;

And I thought it'd be great to find a way to automate this. So I had a go myself in BATCH. It works alright til I get to the TELNET commands:

Code: Select all

:start

cls
set /p email="Email to verify?"

cls

echo Checking
echo %text% 

PAUSE

telnet mail.reddit.com 25
HELO HI
MAIL FROM: <youremail@gmail.com>
RCPT TO: <%email%>
I know the last line is probably a syntax error anyway, but is there a way to do multiple telnet commands like this in BATCH? Right now it doesn't get past telnet mail.reddit.com 25
Sprich mit mir!

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Re: Mixing BATCH with Telnet

Post by bad_brain »

well, it's not THAT simple, you have to use the Send-function instead and use the Sleep-function to give the other side time to process the last command.
here is a good example:

http://www.planet-source-code.com/vb/sc ... 5&lngWId=4" onclick="window.open(this.href);return false;
Image

Post Reply