The UDF above "determines" a connection by getting a return code by making a connection to a SMTP server via telnet. I admit, I have not tested this on any other type of telnet server. It may be possible to modify the udf above to meet your needs but you might also consider the other suggestions in this thread.

If you want to use the UDF I wrote, you will need to run the telnet command in a command window with the logging feature enabled (telnet -f telnet.log xxx.xxx.xxx.xxx p). Then look at the log to see if it gives you a consistent connection line. Then modify the UDF above to look for that string, changing this line: If Left($line,3)=220.

You might also post your results and we might be able to help.