I have a web application that sends mail. Everything works fine when the application is deployed in development server. But the same application fails to connect to smtp host when it's deployed in production sever. Following is the error log
javax.mail.MessagingException: Could not connect to SMTP host: smtp.cbeyond.com, port: 587;
nested exception is:
java.net.ConnectException: Connection refused: connect
Have you mentioned proper host SMTP host address (i.e. of your ISP's SMTP address) in the application which sends email .
If you mentioned correctly can you try to ping that address from the production server.