Bootstrap

java邮箱exchange_使用Javamail访问Microsoft Exchange邮箱(IMAP,MS Exchange)

我需要通过IMAPS

JavaMail连接到Microsoft Exchange Server.首先,我得到了:

A1 NO AUTHENTICATE failed.

javax.mail.AuthenticationFailedException: AUTHENTICATE failed.

我的调试器中的异常.

然后,我禁用了一些身份验证协议:

imapProps.setProperty("mail.imaps.auth.plain.disable", "true");

imapProps.setProperty("mail.imaps.auth.ntlm.disable", "true");

imapProps.setProperty("mail.imaps.auth.gssapi.disable", "true");

这是我得到的新例外(我附上了整个日志):

DEBUG: setDebug: JavaMail version 1.4.4

DEBUG: getProvider() returning javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc]

DEBUG: mail.imap.fetchsize: 16384

DEBUG: mail.imap.statuscachetimeout: 1000

DEBUG: mail.imap.appendbuffersize: -1

DEBUG: mail.imap.minidletime: 10

DEBUG: disable AUTH=PLAIN

DEBUG: disable AUTH&#

;