English 中文(简体)
javamail access to the common letter Box
原标题:javamail access to a shared mailbox

I m试图写一份java申请,再读电子邮件并从事其他活动共享。 我看不出自己的INBOX(或其文件夹和复制件;内容),但很难找到如何使用(并最终使用/阅读)共用邮件箱的信息。

最佳回答

在其他答复的帮助下,我提出了以下解决办法: comsun.mail:javax.mail:1.6.2

Properties props = new Properties();
props.setProperty("mail.imaps.auth.mechanisms", "LOGIN");
Session session = Session.getInstance(props);
Store store = session.getStore("imaps");
store.connect("outlook.office365.com", 993, "[email protected]\shared_account_alias", "user_password");

电子邮件:1.4.7 遵循法典:

Properties props = new Properties();
props.setProperty("mail.imaps.auth.plain.disable", "true");
Session session = Session.getInstance(props);
Store store = session.getStore("imaps");
store.connect("outlook.office365.com", 993, "[email protected]\shared_account_alias", "user_password");

共享——账户是NOT的电子邮件地址。

最后,我找到了使用共用邮件箱的更标准的方法:

Properties props = new Properties();
props.setProperty("mail.imaps.sasl.enable", "true");
props.setProperty("mail.imaps.sasl.authorizationid", "shared_account_alias");
Session session = Session.getInstance(props);
Store store = session.getStore("imaps");
store.connect("outlook.office365.com", 993, "[email protected]", "user_password");
问题回答

我正在做以下工作,正在为我工作罚款。

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 [email protected] then
abc\tarun\shared_MB

您还必须进入





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签