I used the command: "docker run -p "25:25" -p "143:143" apache/james:demo-3.7.3" to create the James server and the server is UP.
08:45:58.837 [INFO ] o.a.j.w.WebAdminServer - Web admin set up to enable CORS from * 08:45:58.979 [INFO ] o.a.j.w.WebAdminServer - Web admin server started
08:45:59.112 [INFO ] o.a.j.m.s.JMXServer - JMX server started
08:45:59.134 [INFO ] o.a.j.GuiceJamesServer - **JAMES server started** AddDomain command executed sucessfully in 360 ms. AddUser command executed sucessfully in 489 ms. AddUser command executed sucessfully in 357 ms. AddUser command executed sucessfully in 325 ms.
And I tried to connect like this.
BufferedReader reader = new BufferedReader(inputStreamReader);
Properties props = new Properties();
MailSSLSocketFactory sf = new MailSSLSocketFactory();
sf.setTrustAllHosts(true);
props.setProperty("mail.store.protocol", "imap");
props.setProperty("mail.imap.port", "143");
Session session = Session.getDefaultInstance(props, null);
Store store = session.getStore("imap");
store.connect( "localhost","user01@james.local", "1234");
but received the error:
javax.mail.MessagingException: No login methods supported!;
nested exception is:
com.sun.mail.iap.ProtocolException: No login methods supported!
Does anyone know about this error or how I can connect?