# Enforcing SSL protocols between Platform JEMAIL and SMTP server

**URL:** <https://forum.kx.com/t/enforcing-ssl-protocols-between-platform-jemail-and-smtp-server/13682>\
**Category:** Community Support\
**Tags:** imported, other\
**Created:** [June 17, 2021, 12:00am UTC](https://forum.kx.com/t/enforcing-ssl-protocols-between-platform-jemail-and-smtp-server/13682 "2021-06-17T00:00:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dcrossey](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@dcrossey](https://forum.kx.com/u/dcrossey)\
**Post date:** [June 17, 2021, 12:00am UTC](https://forum.kx.com/t/enforcing-ssl-protocols-between-platform-jemail-and-smtp-server/13682/1 "2021-06-17T00:00:00Z")

</div>

[https://learninghub.kx.com/forums/topic/enforcing-ssl-protocols-between-platform-jemail-and-smtp-server](https://learninghub.kx.com/forums/topic/enforcing-ssl-protocols-between-platform-jemail-and-smtp-server)

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:

&nbsp;

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**

&nbsp;

**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:

&nbsp;

You should see a similar message to this on your jemail process log after restarting:

&nbsp;

Now we can establish the TLS connection and send emails out

&nbsp;

Sample email API call:

&nbsp;

.email.send[`to`subject`body!(`$"YOURNAME@DOMAIN.COM";“Test email”;“This is a test email”)]

&nbsp;

Further reading here:

- [Email engine - KX Platform](https://code.kx.com/platform/email_server/#ds_jemail_server-configuration")
- [com.sun.mail.smtp (JavaMail API documentation) (javaee.github.io)](https://javaee.github.io/javamail/docs/api/com/sun/mail/smtp/package-summary.html")

Best regards,

David

&nbsp;
