This article explains how to fix Portal Dedicated email delivery problems by configuring it to support SMTP servers that use unencrypted connections
Problem
If your SMTP server does not support STARTTLS and only accepts unencrypted HTTP connections, your email delivery may fail due to Spring Boot attempting to initiate a secure STARTTLS handshake.
You may see errors like:
Mail server connection failed. Failed messages: jakarta.mail.MessagingException: Could not convert socket to TLS; nested exception is:
javax.net.ssl.SSLHandshakeException: No subject alternative DNS name matching smtp.mailhost.com found.
Solution
To resolve this, you need to explicitly disable STARTTLS in your application.properties file by following the steps below:
1) Open your application.properties file and add the following line to disable STARTTLS:
spring.mail.properties.mail.smtp.starttls.enable=false
2) Save the file.
3) Restart your Portal Dedicated instance to ensure the new configuration is loaded.