Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not trusted server certificate #5

Open
GoogleCodeExporter opened this issue Mar 31, 2016 · 4 comments
Open

Not trusted server certificate #5

GoogleCodeExporter opened this issue Mar 31, 2016 · 4 comments

Comments

@GoogleCodeExporter
Copy link

Hi,
  i get an error(Not trusted server certificate) ,when i use IMAP connect Gmail  server in the mobile oem.


  so ,i use explorer open the site:https://www.google.com, say  not valid certificate yed

Original issue reported on code.google.com by [email protected] on 29 Jun 2010 at 9:57

@GoogleCodeExporter
Copy link
Author

but the application in my nexus on is run well!

Original comment by [email protected] on 29 Jun 2010 at 9:58

@GoogleCodeExporter
Copy link
Author

I get "Not trusted server certificate" error when I am trying to connect to 
exchange server through IMAP. I can get my google emails with the same method 
but not the exchange one's. 

is there a way to make android the certificate automatically? 

Here is my code: 

Properties props = System.getProperties();
        props.setProperty("mail.store.protocol", "imaps");
            try {
                Session session = Session.getDefaultInstance(props, null);
                Store store = session.getStore("imaps");
                store.connect("mail.dancorproiect.ro", "cata", "qwe123..");
                System.out.println(store);

                Folder inbox = store.getFolder("Inbox");
                inbox.open(Folder.READ_ONLY);
                Message messages[] = inbox.getMessages();
                for(Message message:messages) {
                try {
                    System.out.println(message.getContent());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        } catch (NoSuchProviderException e) {
            e.printStackTrace();
            System.exit(1);
        } catch (MessagingException e) {
            e.printStackTrace();
            System.exit(2);
        }

Original comment by [email protected] on 7 Mar 2011 at 8:12

@GoogleCodeExporter
Copy link
Author

hey,maybe you can check your sysdate.

Original comment by [email protected] on 6 Apr 2011 at 2:18

@GoogleCodeExporter
Copy link
Author

hey,maybe you can check your device's sysdate.

Original comment by [email protected] on 6 Apr 2011 at 2:41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant