使用JavaMail连接到IMAP,获取"A1 NO LOGIN failed"的消息.例外 [英] Using JavaMail to connect to IMAP getting "A1 NO LOGIN failed" exception
本文介绍了使用JavaMail连接到IMAP,获取"A1 NO LOGIN failed"的消息.例外的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下是我要连接的服务器的详细信息
Following is the detail of the server I'm trying to connect
mailbox_password = KexDa3P7hEtru
mailbox_domain = mail.lenderlive.com
mailbox_host= corp.lcl
mailbox_username = SecondaryQC@lenderlive.com
server_type = imap
port = 143
我正在使用以下Java代码连接到交易所:
I'm using the following java code to connect to exchange:
String domain = "mail.lenderlive.com";
String user= "SecondaryQC@lenderlive.com";
String password= "KexDa3P7hEtru";
String serverType = "imap";
Store store = null;
Properties properties = System.getProperties();
Session session = Session.getDefaultInstance(properties);
session.setDebug(true);
store = session.getStore(serverType);
store.connect(domain, user, password);
这是我得到的服务器跟踪:
Here is the server trace that I have been getting:
2016-11-02 15:01:22,885 INFO [stdout] (http-/0.0.0.0:80-1) DEBUG: setDebug: JavaMail version 1.4ea
2016-11-02 15:01:22,888 INFO [stdout] (http-/0.0.0.0:80-1) DEBUG: getProvider() returning javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc]
2016-11-02 15:01:22,899 INFO [stdout] (http-/0.0.0.0:80-1) DEBUG: mail.imap.fetchsize: 16384
2016-11-02 15:01:22,899 INFO [stdout] (http-/0.0.0.0:80-1) DEBUG: disable AUTH=PLAIN
2016-11-02 15:01:22,910 INFO [stdout] (http-/0.0.0.0:80-1) * OK The Microsoft Exchange IMAP4 service is ready.
2016-11-02 15:01:22,913 INFO [stdout] (http-/0.0.0.0:80-1) A0 CAPABILITY
2016-11-02 15:01:22,915 INFO [stdout] (http-/0.0.0.0:80-1) * CAPABILITY IMAP4 IMAP4rev1 AUTH=NTLM AUTH=GSSAPI AUTH=PLAIN STARTTLS UIDPLUS CHILDREN IDLE NAMESPACE LITERAL+
2016-11-02 15:01:22,915 INFO [stdout] (http-/0.0.0.0:80-1) A0 OK CAPABILITY completed.
2016-11-02 15:01:22,915 INFO [stdout] (http-/0.0.0.0:80-1) IMAP DEBUG: AUTH: NTLM
2016-11-02 15:01:22,915 INFO [stdout] (http-/0.0.0.0:80-1) IMAP DEBUG: AUTH: GSSAPI
2016-11-02 15:01:22,916 INFO [stdout] (http-/0.0.0.0:80-1) IMAP DEBUG: AUTH: PLAIN
2016-11-02 15:01:22,922 INFO [stdout] (http-/0.0.0.0:80-1) DEBUG: protocolConnect login, host=mail.lenderlive.com, user=SecondaryQC@lenderlive.com, password=<non-null>
2016-11-02 15:01:22,925 INFO [stdout] (http-/0.0.0.0:80-1) A1 LOGIN SecondaryQC@lenderlive.com KeDa3P7hEtru
2016-11-02 15:01:22,928 INFO [stdout] (http-/0.0.0.0:80-1) A1 NO LOGIN failed.
有人可以帮忙解释一下我到底在做错什么吗?
Can someone please help and explain what exactly I'm doing wrong?
推荐答案
- 您使用的JavaMail版本非常旧,如果您要升级,请升级可以.
- 您可能需要启用SSL .
- 您应将Session.getDefaultInstance更改为Session.getInstance .
- 希望您没有在上面发布密码. :-)
- You're using a very old version of JavaMail, please upgrade if you can.
- You might need to enable SSL.
- You should change Session.getDefaultInstance to Session.getInstance.
- I hope you didn't really publish your password above. :-)
这篇关于使用JavaMail连接到IMAP,获取"A1 NO LOGIN failed"的消息.例外的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文