• Post Reply Bookmark Topic Watch Topic
  • New Topic

Protocol Indpendent Way of Seeing if Mail Server is up?  RSS feed

Mike London
Ranch Hand
Posts: 1340
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.



-- Mike
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!