Javax.mail.SendException,,, Connection timed out
807607Dec 12 2006 — edited Dec 14 2006Hi
Was wondering if anyone could help me out to sort a problem I'm facing with a mail-application I'm configuring.
I have a mailprogram that are gonna send all from 100 to a 1000 mail. This is business related, and not spam,,,so that is said.
What happens is, that when sendinging mail, once in a while I get the Exception(I've commented out some of the classes and mailserver, because it has sensetive customers name in it):
javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.MessagingException: Could not connect to SMTP host: ***.***.**.**, port: 25;
nested exception is:
java.net.ConnectException: Connection timed out: connect
at javax.mail.Transport.send0(Transport.java:219)
at javax.mail.Transport.send(Transport.java:81)
at no.*****(SendCampaign.java:131)
at no.******(SendCampaign.java:72)
at com.*****.Run.run(Run.java:80)
at com.******.Run.main(Run.java:210)
javax.mail.MessagingException: Could not connect to SMTP host: ***.***.**.**, port: 25;
nested exception is:
java.net.ConnectException: Connection timed out: connect
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:867)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:156)
at javax.mail.Service.connect(Service.java:234)
at javax.mail.Service.connect(Service.java:135)
at no.*****.send(SendCampaign.java:87)
at no.*****.send(SendCampaign.java:72)
at com.*****.mail.Run.run(Run.java:80)
at com.*******.mail.Run.main(Run.java:210)
Why do this occur sometimes after 70 mails - then just once or twice -, or after e few 100?
For, by sending for instance 1000 mails, I get everything from 1 to 20 mails that goins wrong.
Have set up a Thread to delay time between sending, and this mafde me go from a 100 wrongs (sometimes) to now 1-20.
Anyone knows if there is a way to determine a succesfull deliver, or to set the correct time between sendings?
Cincernly Paul