Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

telnet smtp server

$
0
0

Hi Guys,

I am totally new to scripting. I have created a vbscript

I am telneting smtp server on port 25 through the below script:

Option Explicit
On Error Resume Next
Dim WshShell
set WshShell=CreateObject("WScript.Shell")
Set myCommand = CreateObject("WScript.Shell")
WshShell.run "telnet.exe"
WScript.Sleep 1000
WshShell.SendKeys "o server 25"
WshShell.SendKeys "{Enter}"
WScript.Sleep 1000
WshShell.SendKeys "^{]}"
WshShell.SendKeys "q"
WshShell.SendKeys ("{Enter}")
WScript.Quit

After the line WshShell.SendKeys "o server 25" when it gives the output that contains 220 then i want to to get this in log file as good and if some other than bad.

Please help me guys!!

Thanks


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>