String popServer = "pop.gmail.com";
String popUser = "subhash...@daffodildb.com";
String popPassword = "hrhk12";
Store store = null;
Properties props = System.getProperties();
props.put("mail.pop3.host", popServer);
props.put("mail.pop3.auth", "true");
props.put("mail.pop3.port", "995");
props.put("mail.pop3.socketFactory.port", "995");
props.put("mail.pop3.socketFactory.class",
"javax.net.ssl.SSLSocketFactory");
props.put("mail.pop3.socketFactory.fallback", "true");
Session session = Session.getDefaultInstance(props,
new DAuthenticator(popUser,popPassword));
store = session.getStore("pop3");
......................................................................................................................................................
,,,,,,,,,,,,,
but getting the following exception ,,,
ex.getMessage();Connect failed;
nested exception is:
javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: No trusted certificate found
javax.mail.MessagingException: Connect failed;
nested exception is:
javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: No trusted certificate found
at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:106)
at javax.mail.Service.connect(Service.java:256)
at javax.mail.Service.connect(Service.java:135)
at javax.mail.Service.connect(Service.java:87)
at
com.daffodilwoods.framework.mail.server.LeadsMailListener.downLoadFiles(LeadsMailListener.java:551)
at
com.daffodilwoods.framework.mail.server.LeadsMailListener.main(LeadsMailListener.java:593)
if any hv any idea abt this then pls , help me where i hv somethin
wrong
any suggestion will appriciated
thanks
subhash chander
at com.sun.mail.pop3.POP3Store.protocolConnect (POP3Store.java:106)
at javax.mail.Service.connect(Service.java:256)
at javax.mail.Service.connect(Service.java:135)
at javax.mail.Service.connect(Service.java:87)
at
com.daffodilwoods.framework.mail.server.LeadsMailListener.downLoadFiles (LeadsMailListener.java:551)