Hey all,
If you are using the bundled java email engine in KX Platform to send emails to an (SMTP) relay server using TLS, and you’ve recently upgraded/or the SMTP has been upgraded, and you’ve seen an error where the TLS connection cannot be established (after working previously), such as:
You will need to add a new parameter to your DS_JEMAIL_SERVER config to explicitly set the SSL protocol that is accepted by your SMTP relay server.
For example:
mail.smtp.ssl.protocols Specifies the SSL protocols that will be enabled for SSL connections
mail.smtp.ssl.protocols=TLSv1.2
Note - I’ve redacted the from / host / trust addresses.
After updating your configuration, remember to bounce your java email process to pick up the new configuration:
You should see a similar message to this on your jemail process log after restarting:
Now we can establish the TLS connection and send emails out
Sample email API call:
.email.send[to
subjectbody!(
$"YOURNAME@DOMAIN.COM";“Test email”;“This is a test email”)]
Further reading here:
Best regards,David