This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes javamail,No login methods supported  exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "javamail,No login methods supported  exception" Watch "javamail,No login methods supported  exception" New topic
Author

javamail,No login methods supported exception

Neema Jacob
Greenhorn

Joined: Feb 29, 2008
Posts: 2
===============================================================================================================
String host="xx,x.xx.cx";
final String username="sssssss@bs-shipmanagement.com";
final String password="444444444444";

Authenticator auth=new Authenticator()
{

protected PasswordAuthentication getPasswordAuthentication()
{
return new PasswordAuthentication(username, password);
}

};
Properties props=new Properties();

Session session = Session.getInstance(props,auth);
session.setDebug(true);
Store store = session.getStore("imap");


System.out.println("store------"+store);
store.connect(host,username,password);
System.out.println("Connected...");
Folder inbox = store.getDefaultFolder().getFolder("INBOX");
inbox.open(Folder.READ_ONLY);

Message[] msg = inbox.getMessages();

System.out.println(msg);

inbox.close(false);
store.close();
=========================================================================================================================
DEBUG: setDebug: JavaMail version 1.4.4
DEBUG: getProvider() returning javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc]
DEBUG: mail.imap.fetchsize: 16384
DEBUG: mail.imap.statuscachetimeout: 1000
DEBUG: mail.imap.appendbuffersize: -1
DEBUG: mail.imap.minidletime: 10
store------imap:
DEBUG: trying to connect to host "xx,x.xx.cx", port 143, isSSL false
* OK The Microsoft Exchange IMAP4 service is ready.
A0 CAPABILITY
* CAPABILITY IMAP4 IMAP4rev1 LOGINDISABLED IDLE NAMESPACE LITERAL+
A0 OK CAPABILITY completed.
DEBUG: protocolConnect login, host=xx,x.xx.cx, user=sasds@bs-ssmanagement.com, password=<non-null>
javax.mail.MessagingException: No login methods supported!;
nested exception is:
com.sun.mail.iap.ProtocolException: No login methods supported!
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:663)
at javax.mail.Service.connect(Service.java:295)
at javax.mail.Service.connect(Service.java:176)
at BsmMail.main(BsmMail.java:51)
Caused by: com.sun.mail.iap.ProtocolException: No login methods supported!
at com.sun.mail.imap.IMAPStore.login(IMAPStore.java:725)
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:643)
... 3 more
===========================================================================================================================
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javamail,No login methods supported exception
 
Similar Threads
javax.mail.MessagingException: Connection dropped by server?; Error
pop3 works, imap fails with No login methods supported!
IMAP /TLS standalone programm works fine, in Tomcat fails.
how to read inbox using javamail from microsoft exchange server through proxy server?
IMAP/TLS Problem in connecting using java mail api.