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
I was the same issue.
MailSSLSocketFactory socketFactory = new MailSSLSocketFactory(); socketFactory.setTrustedHosts(new String[] { "my-server"}); socketFactory.setTrustAllHosts(true); props.put("mail.smtps.socketFactory", socketFactory);
MailSSLSocketFactory socketFactory = new MailSSLSocketFactory(); socketFactory.setTrustedHosts(new String[] { "my-server"});
socketFactory.setTrustAllHosts(true); props.put("mail.smtps.socketFactory", socketFactory);
it's works!!