The moose likes Other Java Products and Servers and the fly likes Problem connecting to smtp host Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Other Java Products and Servers
Reply Bookmark "Problem connecting to smtp host" Watch "Problem connecting to smtp host" New topic
Author

Problem connecting to smtp host

Swastik Dey
Ranch Hand

Joined: Jan 08, 2009
Posts: 990

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

Any help on this will be highly appreciated.


Swastik
Chetan Dorle
Ranch Hand

Joined: Aug 06, 2009
Posts: 80

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.
Swastik Dey
Ranch Hand

Joined: Jan 08, 2009
Posts: 990

Yes, telnet to smtp works.
 
 
subject: Problem connecting to smtp host
 
Threads others viewed
embeded java smtp server
SMTP protocol : please help !
Could not open connection to the host, on port 25: Connect Failed.
SmtpClient
Problem in sending email from a portlet
IntelliJ Java IDE