Featured post
javamail connect to imap over ssl to read mails -
i want read emails exchange server on imap ssl javamail api. using following piece of code.
properties props =system.getproperties();
props.setproperty("mail.store.protocol","imaps");
session session = session.getdefaultinstance(props, null);
store store = session.getstore("imaps");
store.connect("server hostname","username","password");
but unable establish connection. following error.
javax.mail.messagingexception: sun.security.validator.validatorexception: pkix path validation failed: java.security.cert.certpathvalidatorexception: timestamp check failed; nested exception is: javax.net.ssl.sslhandshakeexception: sun.security.validator.validatorexception: pkix path validation failed: java.security.cert.certpathvalidatorexception: timestamp check failed @ com.sun.mail.imap.imapstore.protocolconnect(imapstore.java:618) @ javax.mail.service.connect(service.java:291) @ javax.mail.service.connect(service.java:172) at
i not sure if there pre-requisite steps followed establishing connection.
appreciate help!
to mail server u r trying connect?? replace imaps imap , try it.
if need use imaps try this
http://blogs.oracle.com/andreas/entry/no_more_unable_to_find
- Get link
- X
- Other Apps
Comments
Post a Comment