On Wed, 24 Dec 2014 12:51:20 GMT, Maaaks wrote:

smtp.sslValidationMode = SSLPeerValidationMode.trustedCert;

This is probably the reason for the error. For this to succeed, you'd also have to set smtp.sseContextSetup (mind the typo) and add some trusted certificates to the context using SSLContext.useTrustedCertificateFile.

Setting SSLPeerValidationMode.validCert would skip the trust check and should also eliminate the error message.