Hi Mr. Paul. I'm very thankful that you replied and i also tried to run the msgshow.java file in the demo folder and it gets compiled nicely but when it comes the time to run, it gives me exceptions.
I am runnig it with the following command
java msgshow -T imap -H pop.gmail.com -U
my_id@gmail.com -P pwd -f INBOX 1
But on doing this i'm getting the exception...
javax.mail.MessagingException: Connection timed out: connect;
nested exception is:
java.net.ConnectException: Connection timed out: connect
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:571)
at javax.mail.Service.connect(Service.java:288)
at msgshow.mail(msgshow.java:162)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.PlainSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.PlainSocketImpl.connect(Socket.java:519)
at java.net.PlainSocketImpl.connect(Socket.java:469)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:233)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
at com.sun.mail.iap.Protocol.<init>(Protocol.java:107)
at com.sun.mail.imap.protocol.IMAPProtocol<init>(IMAPProtocol.java:104)
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:538)
... 2 more
This is what i'm getting. I will be very delighted if you can solve this or else give me some simple code for gmail mail storage. Thanking you...