telnet smtp server RRS feed

  • Question

  • 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}")

    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!!


    Monday, December 23, 2013 4:04 PM


All replies