Well not pretty and not a best practice but it works.
Al_Po wrote this little tid-bit up and we cleaned it up a little for presentation until such time as there is a better method.
Code:
If MailServerUp($Server)
? 'System is responding'
Else
? 'System did not respond'
EndIf
Function MailServerUp($mailserver)
Dim $output,$,$fh,$line,$path
$output='%temp%\output.txt'
If Exist($output)
Del $output
EndIf
Run '%comspec% /c telnet -f ' + $output + ' ' + $mailserver + ' 25'
Sleep 2
$=EndProc('telnet.exe')
Sleep 1
$fh=FreeFileHandle()
If Open($fh,$output)=0
$line=ReadLine($fh)
While @ERROR=0
If Left($line,3)=220
$MailServerUp=1
EndIf
$line=ReadLine($fh)
Loop
$=Close($fh)
EndIf
If Exist($output)
Del $output
EndIf
EndFunction
Function EndProc($proc, optional $strComputer)
DIM $Process
If $strComputer=''
$strComputer='.'
EndIf
For Each $Process In GetObject("winmgmts:{impersonationLevel=impersonate}!\\" + $strComputer +
"\root\cimv2").ExecQuery("Select * from Win32_Process where Name= " +'"'+$Proc+'"')
$Process=$Process.Terminate
Next
EndFunction