Skip to main content
Participating Frequently
June 15, 2023
Question

CFMAIL/CFPOP Issue

  • June 15, 2023
  • 2 replies
  • 2818 views

I am wondering if anyone has any ideas to help me troubleshoot a mail issue with ColdFusion 2016:

The server is sending and receiving mail via Google Workspace Gmail. It has been working fine for at least a year, and there haven't been any changes lately. But suddenly, maybe 50% of the time, there is a connection error trying to send or receive mail. I can't seem to figure out what's wrong. This is what the errors look like in the ColdFusion Out logs:

Jun 14, 2023 14:30:12 PM Error [ajp-nio-127.0.0.1-8016-exec-6] - com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp-relay.gmail.com, 587; timeout 120000; nested exception is: java.net.ConnectException: Connection refused: connect
Jun 14, 2023 14:30:12 PM Error [ajp-nio-127.0.0.1-8016-exec-6] - A problem occurred when attempting to deliver mail. This exception was caused by: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp-relay.gmail.com, 587; timeout 120000; nested exception is...

 

Again, this has all been working fine. I am not using TLS or SSL. Could this be a DNS issue? If so, I wouldn't know how to determine that.

 

Thank you for any ideas.

    This topic has been closed for replies.

    2 replies

    Legend
    June 15, 2023

    If you are not using TLS nor SSL you may need to check what IP address your server is using.  According to this Google article, "If you’re not using TLS encryption, configure your on-premise server to point to smtp-relay.gmail.com on port 25, 465, or 587. Without TLS encryption, you can't use SMTP authentication and must use IP address authentication."

    Better check that any possible IP your server may use is registered with Google.

    Participating Frequently
    June 15, 2023

    Well I spoke to Google support and they claim my issue had to do with my SPF DNS record. I have updated it and we'll see what happens when that propagates. But they also want me to use TLS and SMTP authentication. I understand that I can just check those two boxes in the ColdFusion Admin, but previously when I was checking those boxed I would get "unable to connect to server" when I tried to verify the connection. Is there anything else I need to have in place to make those two options work?

     

    Legend
    June 15, 2023

    Make sure you have the latest JVM update, and keep it updated, in order to make sure you have valid SSL stores.

    Participating Frequently
    June 15, 2023

    Update: I have done a tracert and there are definitely extended timeouts along the route for some reason. I guess there is nothing I can do but wait and hope it gets resolved.