Sending Email via using AWS SES - Timeout issues

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

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

Hi JP,

I use SES with Lucee no problem, but I have it configured to use port 587
with TLS enabled and this has never caused me any issues and I regularly
(more than once a day) send 1000s of emails at a time without issue. I
never had any luck using port 25 with SES, so maybe try the secure port
instead.

Kind regards,

Andrew
about.me http://about.me/andrew_dixon - mso http://www.mso.net - Lucee
Association Member http://lucee.orgOn 25 August 2016 at 17:32, JP <@JP1> wrote:

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
http://email-smtp.us-east-1.amazonaws.com Could not connect to SMTP host:
email-smtp.us-east-1.amazonaws.com
http://email-smtp.us-east-1.amazonaws.com, port: 25; nested exception is:
java.net.ConnectException: connection to email-smtp.us-east-1.amazonaws.com
http://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

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


Get 10% off of the regular price for this years CFCamp in Munich, Germany
(Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€
instead of 210€. Visit https://ti.to/cfcamp/cfcamp-
2016/discount/Lucee@cfcamp

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/
msgid/lucee/2705c06c-68a3-40f7-b3fc-0753a49680bf%40googlegroups.com
https://groups.google.com/d/msgid/lucee/2705c06c-68a3-40f7-b3fc-0753a49680bf%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

Thanks guys… I tried port 587 and it worked this time.On Friday, August 26, 2016 at 3:37:00 AM UTC-6, Nando Breiter wrote:

I also use SES to send out 1000’s of emails a day without issue for a
number of years now, but not via port 25. Ditto on try the secure port …

Aria Media Sagl
+41 (0)76 303 4477 cell
skype: ariamedia

On Fri, Aug 26, 2016 at 11:05 AM, Andrew Dixon <andrew...@gmail.com <javascript:>> wrote:

Hi JP,

I use SES with Lucee no problem, but I have it configured to use port 587
with TLS enabled and this has never caused me any issues and I regularly
(more than once a day) send 1000s of emails at a time without issue. I
never had any luck using port 25 with SES, so maybe try the secure port
instead.

Kind regards,

Andrew
about.me http://about.me/andrew_dixon - mso http://www.mso.net - Lucee
Association Member http://lucee.org

On 25 August 2016 at 17:32, JP <jo...@redtopia.com <javascript:>> wrote:

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
http://email-smtp.us-east-1.amazonaws.com Could not connect to SMTP host:
email-smtp.us-east-1.amazonaws.com
http://email-smtp.us-east-1.amazonaws.com, port: 25; nested exception is:
java.net.ConnectException: connection to email-smtp.us-east-1.amazonaws.com
http://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

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


Get 10% off of the regular price for this years CFCamp in Munich,
Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€
instead of 210€. Visit
https://ti.to/cfcamp/cfcamp-2016/discount/Lucee@cfcamp

You received this message because you are subscribed to the Google
Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to lucee+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com
<javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/2705c06c-68a3-40f7-b3fc-0753a49680bf%40googlegroups.com
https://groups.google.com/d/msgid/lucee/2705c06c-68a3-40f7-b3fc-0753a49680bf%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.


Get 10% off of the regular price for this years CFCamp in Munich, Germany
(Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€ instead
of 210€. Visit https://ti.to/cfcamp/cfcamp-2016/discount/Lucee@cfcamp

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>
.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAG1WijVNbi-JvbPc97n_RrUVHsOXTZRF2f%2BcxTPvt7RSUuzYtg%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CAG1WijVNbi-JvbPc97n_RrUVHsOXTZRF2f%2BcxTPvt7RSUuzYtg%40mail.gmail.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.