To build you will need:
To build all changes incrementally:
mvn install
To perform clean builds, which are sometimes needed after some changes to the source tree:
mvn clean install
By default, the implementation checks for the presence of ssl.protocols. If this property is not set, the SSL/TLS socket is created with JVM defaults.
The property ssl.protocols can be used to specify a list of protocols, which should be enabled for the underlying SSL/TLS socket. It accepts a list of protocols with a whitespace as delimiter.
To support TLSv1+ the following property can be set:
mail.smtp.ssl.protocols=TLSv1 TLSv1.1 TLSv1.2 TLSv1.3
The property ssl.socketFactory.class can be used to specify a custom SSL socket factory, which is used to create the underlying SSL/TLS socket. This allows full control of supported cyphers or protocols.
mail.smtp.ssl.socketFactory.class=my.custom.CustomSSLSocketFactory
The property ssl.socketFactory can be used to specify a pre-configured custom SSL socket factory, which is used to create the underlying SSL/TLS socket. In this context, the instance has to be passed to the Properties of the related MailSession. This allows full control of supported cyphers or protocols.
By default, the implementation checks for the presence of ssl.ciphersuites. If this property is not set, the SSL/TLS socket is created with all supported ciphers of the given SSL Socket.
The property ssl.ciphersuites can be used to specify a list of ciphers, which should be enabled for the underlying SSL/TLS socket. It accepts a list of ciphers with a whitespace as delimiter. You have to ensure, that the listed cipher suites are supported by the given JVM.
To support only TLS_AES_128_GCM_SHA256 and TLS_AES_256_GCM_SHA384 the following property can be set:
mail.smtp.ssl.ciphersuites=TLS_AES_128_GCM_SHA256 TLS_AES_256_GCM_SHA384
The property ssl.socketFactory.class can be used to specify a custom SSL socket factory, which is used to create the underlying SSL/TLS socket. This allows full control of supported cyphers or protocols.
mail.smtp.ssl.socketFactory.class=my.custom.CustomSSLSocketFactory
The property ssl.socketFactory can be used to specify a pre-configured custom SSL socket factory, which is used to create the underlying SSL/TLS socket. In this context, the instance has to be passed to the Properties of the related MailSession. This allows full control of supported cyphers or protocols.