Cannot send emails from Springboot application

Solution In Progress - Updated -

Issue

  • While using an external SMTP Relay server, we created a pod with telnet and we are successfully able to telnet to the SMTP relay but not able to send mail from Springboot application running in a pod.

  • The following error can be seen

java.lang.RuntimeException: javax.mail.MessagingException: Exception reading response;
  nested exception is:
                java.net.SocketTimeoutException: Read timed out
Caused by: javax.mail.MessagingException: Exception reading response;
  nested exception is:
                java.net.SocketTimeoutException: Read timed out
Caused by: java.net.SocketTimeoutException: Read timed out
                at java.base/java.net.SocketInputStream.socketRead0(Native Method)

Environment

  • Red Hat OpenShift Container Platform
    • 4.4

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content