when i connect to my imap server using imaps,it failes.
can you tell me how to ignore server cert error in javamail
Exception in thread \"main\"
java
Properties propsSSL = new Properties();
propsSSL.put("mail.transport.protocol", "smtps");
propsSSL.put("mail.smtps.host", "hostname");
propsSSL.put("mail.smtps.auth", "true");
propsSSL.put("mail.smtps.ssl.checkserveridentity", "false");
propsSSL.put("mail.smtps.ssl.trust", "*");
Above changes will fix javax.mail.MessagingException: Could not connect to SMTP host: hostname, port: 465; for the nested exception
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors
exception