Bootstrap

exchange邮箱 java,使用JavaMail访问Microsoft Exchange邮箱(IMAP,微软的Exchange)

I need to connect to a Microsoft Exchange Server through IMAPS JavaMail. First, I got the:

A1 NO AUTHENTICATE failed.

javax.mail.AuthenticationFailedException: AUTHENTICATE failed.

exception in my debugger.

Then, I disabled some authentication protocols:

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

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

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

This is the new exception I'm getting (I've attached the whole log):

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

;