Tuesday, July 23, 2002 10:39 AM
the first thing you do in this case is to check if your server is physically able to connect to the specified server through the specified port.
Execute the following command on the machine from which are you running your Java code:
telnet yasirkhan.com 25
If this gives you "connection failed" error message, it would mean that you are physically not able to get there (for various reasons; most likely one is that port 25 is blocked at your firewall).
If you get any other answer (like the screen goes blank or you see some output), it would mean that you are able to get to the server. In this case, start playing with your code (I am not an expert in JavaMail, so I can't help you much here).