9 Replies Latest reply on Apr 25, 2014 2:01 AM by tribule

    Coldfusion 9 mail issues using Amazon Simple Email Service (SES)

    jbopittman

      I've been having an intermittent issue sending out emails from our Coldfusion 9 application. We have Coldfusion 9 Enterprise on a Windows 2008 Server that is running 5 different Coldfusion instances. In our case, each of the instances are connected to the same Amazon SES service as its' mail server. We are using authentication and TLS. We send out between 2,000 and 15,000 emails per day typically and I'm getting intermittent errors as shown on the mail.log:

       

      "Error","scheduler-4","04/21/14","07:54:27",,"javax.mail.MessagingException: Unknown SMTP host: email-smtp.us-west-2.amazonaws.com;   nested exception is:java.net.UnknownHostException: email-smtp.us-west-2.amazonaws.com"
      "Error","scheduler-0","04/21/14","08:01:55",,"javax.mail.MessagingException: Unknown SMTP host: email-smtp.us-west-2.amazonaws.com;   nested exception is:java.net.UnknownHostException: email-smtp.us-west-2.amazonaws.com"

       

      In these cases, the emails are sent to the Undeliverable folder and are never sent. If I subsequently place them back in the Spool folder, then they go out without fail.

      This is happening across all 5 CF instances and (depending upon volume) occurs almost daily or up to 10 times per day (per instance).

       

      Further examination of the exception.log shows a more detailed version of the error.

       

      "Error","scheduler-0","04/21/14","08:01:55",,"javax.mail.MessagingException: Unknown SMTP host: email-smtp.us-west-2.amazonaws.com;   nested exception is:java.net.UnknownHostException: email-smtp.us-west-2.amazonaws.com"

      javax.mail.MessagingException: Unknown SMTP host: email-smtp.us-west-2.amazonaws.com;

        nested exception is:


      java.net.UnknownHostException: email-smtp.us-west-2.amazonaws.com

      at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1543)

      at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:453)

      at javax.mail.Service.connect(Service.java:291)

      at coldfusion.mail.MailSpooler.getConnection(MailSpooler.java:1244)

      at coldfusion.mail.MailSpooler.deliver(MailSpooler.java:987)

      at coldfusion.mail.MailSpooler.sendMail(MailSpooler.java:905)

      at coldfusion.mail.MailSpooler.deliverFast(MailSpooler.java:1364)

      at coldfusion.mail.MailSpooler.run(MailSpooler.java:1274)

      at coldfusion.scheduling.ThreadPool.run(ThreadPool.java:211)

      at coldfusion.scheduling.WorkerThread.run(WorkerThread.java:71)

      Caused by: java.net.UnknownHostException: email-smtp.us-west-2.amazonaws.com


      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:195)

      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)

      at java.net.Socket.connect(Socket.java:529)

      at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:265)

      at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:227)

      at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1511)

      ... 9 more

       

       

      In an effort to reduce the frequency of this error and/or eliminate it, I've changed my CFAdmin settings to uncheck the "" option (based on this article http://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-issues.html) but that didn't seen to make a difference. I've additionally added a backup email server using a secondary zone from Amazon SES and that has reduced the frequency of the error (perhaps simply due to having redundancies) but the exceptions are still occuring.

       

      I don't know if this is a Coldfusion issue or if it is an Amazon SES issue. Does anyone have any suggestions and/or insight here?