How to use Javamail for accessing additional mailboxes (IMAP, Exchange 2010)

帅比萌擦擦* 提交于 2019-12-01 11:16:39
Tarun Nagpal

I am doing the following and it is working fine for me

properties = System.getProperties();
properties.setProperty("mail.imaps.auth.plain.disable", "true");
properties.setProperty("mail.imaps.auth.ntlm.disable", "true");
Session session = Session.getInstance(properties, null);
store = session.getStore("imaps");
store.connect("HOST", PORT, "DOMAIN\\USER\\SHAREDACCOUNT","pwd");

Here DOMAIN\\USER\\SHAREDACCOUNT would be like this
suppose email account is tarun@abc.com then
abc\\tarun\\shared_MB

You have to also enter the password of tarun@abc.com account.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!