Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Connection Refused. But I can telnet to port 25!

843830Feb 1 2006
Hi Guys

I'm running a web application on Tomcat 5.5.12, and I cannot connect to my SMTP server using javamail from it for some reason. The error I am getting is the following:-
javax.mail.MessagingException: Could not connect to SMTP host: smtpServer, port: 25;
nested exception is:
java.net.ConnectException: Connection refused: connect

What has me totally confused though is that I can telnet to the SMTP server on port 25. I also made a little test java application to run outside of tomcat and it succesfully sent an email to the same server!

Does anyone know what might be causing this. Why would it be failing only from the web application? I have tried just about everything i can think of.

Thanks in advance for your replies.

Matt
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 1 2006
Added on Feb 1 2006
0 comments
226 views