tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Ochani" <>
Subject Re: can't send email from tomcat using javamail api
Date Wed, 01 Feb 2006 14:58:59 GMT
On 2 Feb 2006 at 0:12, Matthew Evans wrote:

> 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:
> 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.

Is the webapp running on the same server as the SMTP server? If so then you have to 
run telnet on that server itselft and connect to localhost on port 25 to do a true test. 

The reason why I'm suggesting this is that the smtp server may not be configured to 
accept localhost connections.

-Steve O.

There's no obfuscated Perl contest because it's pointless.
 - Jeff Polk

Steve O.

New pics: B17G and B24

B17G WWII Bomber "Yankee Lady" Flight


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message