Posted By:
Christopher_Koenigsberg
Posted On:
Saturday, November 29, 2003 12:56 PM
Presumably (? RTFJD) your connection attempts will fail and/or throw a MessagingException. (e.g. as opposed to failures due to authentication)
But remember that you are writing tcp/ip networking code, regardless of how an API tries to simplify it for you.
A failed esmtp/smtp connection, just like any other tcp connection attempt that fails, could be for various different reasons, including: server host is up on the network (e.g. pingable, traceroutable, maybe reachable by other protocols) but no service daemon is listening on that specific port (e.g. tcp 25); entire server host is down temporarily (would be reachable if you try again in a few minutes, hours, or days); server host is down permanently (you need to find yourself a different server host); network/routing/firewall problem between you and the host -- maybe the host is up and is listening on port 25, if your packets could only get to it; or maybe your packets get to it, but the return packets can't get back to you --, etc. (if you are referring to the server by a hostname, there could be temporary or permanent DNS issues too, e.g. it might even be reachable via its IP address, in the meantime until someone fixes a DNS server you are trying ...)