Reputation: 531
I am able to connect to my mailbox perfectly fine using the following code
Store store = session.getStore("imap");
store.connect(host, user, password);
But whenever I try to connect to a shared mailbox, it throws a javax.mail.AuthenticationFailedException: AUTHENTICATE failed
error
store.connect(host, "domainxxx.com" + "\\" + user + "\\" + "shared_mailbox_alias", password);
I read an article that domain\user\alias
format is only supported for the 2010 version of exchange. How else can i connect ?
I use this shared mailbox in my outlook everyday, and it works fine, so I know its running well.
Upvotes: 0
Views: 1843
Reputation: 29971
On the JavaMail wiki we have this note about Exchange:
To access a shared mailbox in Exchange, you need to login using the "alias" name and password for the shared mailbox, which you can get from your Exchange server administrator. This article has more information.
Note that Outlook uses a Microsoft-proprietary protocol, which works differently than IMAP. Not all features of Exchange are accessible through IMAP.
Upvotes: 1