我想通过 Javamail API (1.4.5) 使用 IMAP 和普通登录来访问共享邮箱(不是文件夹)。邮件服务器是 Exchange Server 2010。
用户:用户1([电子邮件受保护])
密码:xxxx
共享邮箱:[电子邮件受保护]
我已成功访问 user1 - 邮箱:
Session session = Session.getInstance(properties, new ExchangeAuthenticator(username, password));
session.setDebug(true);
Store store = session.getStore("imaps");
store.connect(imapHost, username, password);
特性:
邮件.imaps.socketFactory.port = 993
mail.imaps.starttls.enable = true
mail.imaps.socketFactory.class = javax.net.ssl.SSLSocketFactory
mail.imaps.socketFactory.fallback = false
用户名 =[电子邮件受保护]
密码=xxx
--> 这很好用!但现在我想通过更改登录字符串来访问附加邮箱:
[电子邮件受保护]/共享_MB
--> 不幸的是我收到一条“NO AUTHENTICATE”消息:
DEBUG IMAP: AUTHENTICATE PLAIN command result: A1 NO AUTHENTICATE failed.
我能够使用 Thunderbird 进行访问,所以我认为我的代码中缺少一些东西......