Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
Run folderlist.java 1.5.4 with Gmail SSL IMAP
How to run folderlist.java with javax.mail-1.5.4.jar with Gmail using SSL IMAP protocol? I have a valid Gmail email account.
✍: FYIcenter.com
folderlist.java in javamail-samples.zip can be used to retrieve mail folder information from Gmail mail server using SSL IMAP protocol. Here is an execution session of folderlist.java with javax.mail-1.5.4.jar:
fyicenter>cd \local\javamail-1.5.4\javamail-samples
local\javamail-1.5.4\javamail-samples>java -version
java version "1.8.0_45"
local\javamail-1.5.4\javamail-samples>javac -cp .;..\javax.mail-1.5.4.jar
folderlist.java
local\javamail-1.5.4\javamail-samples>java -cp .;..\javax.mail-1.5.4.jar
folderlist -D -L imaps://john:password@imap.gmail.com
DEBUG: setDebug: JavaMail version 1.5.4
DEBUG: getProvider() returning javax.mail.Provider[STORE,imaps,com.sun.mail.imap
.IMAPSSLStore,Oracle]
DEBUG IMAPS: mail.imap.fetchsize: 16384
DEBUG IMAPS: mail.imap.ignorebodystructuresize: false
DEBUG IMAPS: mail.imap.statuscachetimeout: 1000
DEBUG IMAPS: mail.imap.appendbuffersize: -1
DEBUG IMAPS: mail.imap.minidletime: 10
DEBUG IMAPS: closeFoldersOnStoreFailure
DEBUG IMAPS: trying to connect to host "imap.gmail.com", port 993, isSSL true
* OK Gimap ready for requests from 71.174.32.174 h124mb215281799ywc
A0 CAPABILITY
* CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-
1 XYZZY SASL-IR AUTH=XOAUTH2 AUTH=PLAIN AUTH=PLAIN-CLIENTTOKEN AUTH=OAUTHBEARER
AUTH=XOAUTH
A0 OK Thats all she wrote! h124mb215281799ywc
DEBUG IMAPS: AUTH: XOAUTH2
DEBUG IMAPS: AUTH: PLAIN
DEBUG IMAPS: AUTH: PLAIN-CLIENTTOKEN
DEBUG IMAPS: AUTH: OAUTHBEARER
DEBUG IMAPS: AUTH: XOAUTH
DEBUG IMAPS: protocolConnect login, host=imap.gmail.com, user=john,
DEBUG IMAPS: AUTHENTICATE PLAIN command trace suppressed
DEBUG IMAPS: AUTHENTICATE PLAIN command result: A1 NO [AUTHENTICATIONFAILED] Inv
alid credentials (Failure)
Exception in thread "main" javax.mail.AuthenticationFailedException: [AUTHENTICA
TIONFAILED] Invalid credentials (Failure)
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:723)
at javax.mail.Service.connect(Service.java:364)
at javax.mail.Service.connect(Service.java:245)
at javax.mail.Service.connect(Service.java:194)
at folderlist.main(folderlist.java:107)
The output shows that:
⇒ Run folderlist.java 1.5.4 with Gmail SSL POP3
⇐ folderlist Sample Program with JavaMail 1.5.4
2016-01-11, ∼3490🔥, 0💬
Popular Posts:
JDK 17 jdk.jdeps.jmod is the JMOD file for JDK 17 JDeps tool, which can be invoked by the "jdeps" co...
JDK 8 jconsole.jar is the JAR file for JDK 8 JConsole, which is a graphical monitoring tool to monit...
Where Can I see Java Source Code files for Xerces Java 2.11.2? Here are Java Source Code files for X...
What Is mail.jar of JavaMail 1.3? I got the JAR file from javamail-1_3.zip. mail.jar in javamail-1_3...
How to download and install iText7-Core-7.1.4.zip? iText7-Core-7.1.4.zip is the binary package of iT...