LinkedIn
Copied!

SMTP0001: Cannot connect to SMTP host

Pega Predictive Diagnostic Cloud™ (PDC) creates an SMTP0001 event when an application cannot connect to an SMTP server while sending email.

Reason for the event

When Pega Platform™ tries to send email, but cannot connect to an SMTP server, Pega Platform generates an com.sun.mail.util.MailConnectException: Couldn't connect to host exception. PDC recognizes this exception and generates an SMTP0001 event and a corresponding case to track the occurrence of similar exceptions. You can receive a notification for each occurrence of this event.

Example message text

com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.mailgun.org, 587; timeout 0;
  nested exception is:
    java.net.ConnectException: Connection timed out (Connection timed out)
    at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2100)
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:699)
    at javax.mail.Service.connect(Service.java:366)
    at javax.mail.Service.connect(Service.java:246)
    at com.pega.platform.integrationcore.client.email.internal.javamail.JavaEmailClient.connectOutboundInternal(JavaEmailClient.java:295)
    at com.pega.platform.integrationcore.client.email.internal.javamail.JavaEmailClient.connectOutbound(JavaEmailClient.java:269)
    at com.pega.platform.integrationcore.client.email.internal.javamail.JavaEmailClient.connect(JavaEmailClient.java:254)
    ... 48 more
Caused by: java.net.ConnectException: Connection timed out (Connection timed out)
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:589)
    at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:329)
    at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:238)
    at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2066)
    ... 54 more
]

Recommended next steps

To resolve SMTP connection errors, engage the appropriate resources to check the status of the email server and the network connectivity between your application and your email server. After you ensure that connectivity and functionality have been restored, you can resolve the case in PDC.

Suggest Edit

Related Content

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.