commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samuel Le Berrigaud <>
Subject [email] Host IP resolution - Possible pb with javax.mail.Session
Date Fri, 11 Nov 2005 09:23:57 GMT

we have two applications running on the same server. One in a tomcat
server and one is launched from time to time (by a scheduler).

Those 2 apps use commons-email, with javamail 1.3.3 and activation
1.0.2... Somehow the application running into Tomcat fails to send
email after some time. Here is the knid of exception I get :

javax.mail.MessagingException: Could not connect to SMTP host:, port: 25; nested exception is:
Connection refused: connect at
com.sun.mail.smtp.SMTPTransport.openServer( at
at javax.mail.Service.connect( at
javax.mail.Service.connect( at
javax.mail.Service.connect( at
javax.mail.Transport.send0( at
javax.mail.Transport.send( at
org.apache.commons.mail.Email.sendMimeMessage( ... 5

The thing is in the configuration the smtp server we use is as host
name which cannot resolve to The configuration is the same
(in term of smtp servers) for both the applications...

I am wondering if it could not be some pb with the javamail API or the
way commons email uses it... I am sure (thanks to log files) that the
host name and port configured in commons email is correct ...

The problem is that once it occurs once it will never work back unless
I restart the application (Tomcat)...

I some one has any idea of what could happen, or some information I
should look into... I would greatly appreciate.


Samuel Le Berrigaud
View raw message