Using Lucee 4.5, I have a some processes that send batch emails out to a set of users. Sometimes a few hundred emails will be sent. When this happens, the first 10 or so will be sent fine and then the rest timeout, and are added to Tasks that will be re-executed at a later time.
1. The first question is why do you think I'm getting a connection timeout when sending emails via SES?
2. The next question is there a way to detect this situation so I can notify an admin, or possibly run some code to re-execute the threads?
Looking at an email task in the Tasks page, here's the error I'm getting:
email-smtp.us-east-1.amazonaws.com Could not connect to SMTP host: email-smtp.us-east-1.amazonaws.com, port: 25; nested exception is: java.net.ConnectException: connection to email-smtp.us-east-1.amazonaws.com timed out at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1227):1227 at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:322):322 at javax.mail.Service.connect(Service.java:236):236 at lucee.runtime.net.smtp.SMTPSender.run(SMTPSender.java:58):58 :0email-smtp.us-east-1.amazonaws.com Could not connect to SMTP host: email-smtp.us-east-1.amazonaws.com, port: 25;
nested exception is:
java.net.ConnectException: connection to email-smtp.us-east-1.amazonaws.com timed out
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1227):1227
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:322):322
at javax.mail.Service.connect(Service.java:236):236
at lucee.runtime.net.smtp.SMTPSender.run(SMTPSender.java:58):58
:0
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1227):1227
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:322):322
at javax.mail.Service.connect(Service.java:236):236
at lucee.runtime.net.smtp.SMTPSender.run(SMTPSender.java:58):58