Protocol Indpendent Way of Seeing if Mail Server is up?
posted 10 years ago
Aside from just opening a simple socket connection to a URL with, say, port 25, is there a "protocol independent" way to see if a mail server is up regardless of the protocol (IMAP, POP, ....)?
That is, I'm trying to see if there's code that is protocal independent that I can use whether the mail server is POP, IMAP, or whatever.
I have code that talks to an SMTP server using the various SMTP conversation attributes, but this came code wouldn't work with IMAP.
I'm guessing the answer is "No" --> there is no protocol independent way of talking to any IMAP, POP, or whatever mail server -- beyond, perhaps of opening a socket connection and seeing if it succeeds. These are different protocols after all.
So, perhaps the best solution would be to somehow determine which protocol is in use and instantiate the class that would check that type of server.