1

How can I connect to a outlook.office365.com host using IMAPS (whis SSL connection) protocol ? with a shared folder account?

    Properties p = new Properties();
    p.put("mail.store.protocol", "imaps");

    Session session = Session.getDefaultInstance(p, null);
    Store store = session.getStore("imaps");

    store.connect("outlook.office365.com",993,"ACCOUNT NAME","PASSWORD");
Filippo
  • 163
  • 5
  • 13
  • Does that code not work? What happens when you try? – ceejayoz Jun 15 '16 at 13:33
  • it gives me this error Exception in thread "main" javax.mail.AuthenticationFailedException: AUTHENTICATE failed. – Filippo Jun 15 '16 at 13:51
  • Possible duplicate of http://stackoverflow.com/questions/5592112/javamail-smtp-properties-for-starttls . – VGR Jun 15 '16 at 14:31
  • No , i use imaps not smtp – Filippo Jun 15 '16 at 15:34
  • It doesn't like how you're logging in. Can you log in with an IMAP client as expected, such as thunderbird? – Max Jun 15 '16 at 17:23
  • 2
    Does [this article](https://social.technet.microsoft.com/Forums/msonline/en-US/6369118f-7dee-4728-ac1c-a0c706b3d290/office-365-exchange-online-how-to-access-a-shared-mailbox-using-thunderbird-or-other-imap-client?forum=onlineservicesexchange) help? – Bill Shannon Jun 15 '16 at 18:16
  • Did you found solution, to connect to office 365 using imaps protocol? – Delorean Aug 27 '17 at 08:20

0 Answers0