Thursday, July 4, 2002 05:43 AM
Using a public domain SMTP server isn't legal unless you are authorized to use it. In this case you will be prompted for authentication.
NoRouteToHostException may be because your machine may be behind a firewall.
Use a SMTP server within your network and test things out. Verify SMTP service is running. One way to do this is to telnet to that machine. Usually port 25 is for SMTP. Run the following commands:
mail from: firstname.lastname@example.org
rcpt to: email@example.com
You shd get an email as soon as your SMTP server can push it out from the queue. If you do get an email, you're all set to run your javamail program using this SMTP server.