probs when access gmail account with java.mail api

120 views
Skip to first unread message

subhiDaffo

unread,
Oct 27, 2006, 7:54:29 AM10/27/06
to Google Web Toolkit
hi friends
i want to access my mails from my gmail hosted account , with the help
of java application , using javax.mail api , i hv done all the required
setting for gmail.the stting is as follows :--

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

Michael Neale

unread,
Oct 27, 2006, 7:58:54 AM10/27/06
to Google-We...@googlegroups.com
wrong mailling list. This is the web toolkit.

        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)
Reply all
Reply to author
Forward
0 new messages