Loading

How to define the SSL protocol to use in the SMTP transport

Date de publication: Mar 2, 2024
Étapes

DESCRIPTION


The SMTP connector supports the use of SSL connections against servers that require an extra layer of security. The SSL type of connection will vary depending on the type supported by your SMTP server, you can refer to the article "SMTP over SSL" where these details are described.

Sometimes you need for the client-side to honor a certain version of TLS while interacting with the SMTP server, this can be achieved through the use of the property "mail.smtp.ssl.protocols" provided by the JavaMail API.

 

STEPS TO FOLLOW


In order to enforce the use of a certain TLS version in the SMTP transport first validate that the SMTP server accepts that specific version and that your local JVM supports the protocol as well.

The property should be provided as an additional property for the SMTP transport outbound endpoint indicating the TLS version as value.
 
<property key="mail.smtp.ssl.protocols" value="TLSv1.2"/>

In the example below we'll set the SSL protocol to be TLSv1.2 and enable starttls as well.
 
<smtp:outbound-endpoint connector-ref="SMTP_Config" host="yourHost" port="yourPort" user="yourUser" password="yourPassword" to="destination" from="source" responseTimeout="10000" subject="emailSubject" mimeType="text/plain" doc:name="SMTP">
            <property key="mail.smtp.starttls.enable" value="true"/>
            <property key="mail.smtp.ssl.protocols" value="TLSv1.2"/>
</smtp:outbound-endpoint>


Disclaimer: This solution provides a suggestion that should be considered in conjunction with your specific use-case and requirements and does not represent a complete solution for all circumstances.
Numéro d’article de la base de connaissances

001115296

 
Chargement
Salesforce Help | Article