commons-user mailing list archives

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

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:
127.0.0.1, port: 25; nested exception is: java.net.ConnectException:
Connection refused: connect at
com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1227) at
com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:322)
at javax.mail.Service.connect(Service.java:236) at
javax.mail.Service.connect(Service.java:137) at
javax.mail.Service.connect(Service.java:86) at
javax.mail.Transport.send0(Transport.java:150) at
javax.mail.Transport.send(Transport.java:80) at
org.apache.commons.mail.Email.sendMimeMessage(Email.java:863) ... 5
more

The thing is in the configuration the smtp server we use is as host
name which cannot resolve to 127.0.0.1. 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.

Thanks,

--
Samuel Le Berrigaud
Mime
View raw message