如何连接到共享邮箱?
How to connect to a shared mailbox?
我可以使用以下代码完美连接到我的邮箱
Store store = session.getStore("imap");
store.connect(host, user, password);
但是每当我尝试连接到共享邮箱时,它都会抛出 javax.mail.AuthenticationFailedException: AUTHENTICATE failed
错误
store.connect(host, "domainxxx.com" + "\" + user + "\" + "shared_mailbox_alias", password);
我看到一篇文章说 domain\user\alias
格式只支持 2010 版本的交换。 我还能如何连接?
我每天都在outlook里用这个共享邮箱,用着还不错,所以我很了解运行
在 JavaMail wiki 上我们有这个 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.
请注意,Outlook 使用 Microsoft 专有协议,其工作方式与 IMAP 不同。并非 Exchange 的所有功能都可以通过 IMAP 访问。
我可以使用以下代码完美连接到我的邮箱
Store store = session.getStore("imap");
store.connect(host, user, password);
但是每当我尝试连接到共享邮箱时,它都会抛出 javax.mail.AuthenticationFailedException: AUTHENTICATE failed
错误
store.connect(host, "domainxxx.com" + "\" + user + "\" + "shared_mailbox_alias", password);
我看到一篇文章说 domain\user\alias
格式只支持 2010 版本的交换。 我还能如何连接?
我每天都在outlook里用这个共享邮箱,用着还不错,所以我很了解运行
在 JavaMail wiki 上我们有这个 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.
请注意,Outlook 使用 Microsoft 专有协议,其工作方式与 IMAP 不同。并非 Exchange 的所有功能都可以通过 IMAP 访问。