Reading Gmail emails using java : . . . 1)you have to enable the IMAP in gmail sttings
2)Make configuration in other email in my case i used outlook https://support.google.com/mail/answer/21289?co=GENIE.Platform%3DDesktop&hl=en
3)Enable pop3 at google <Forwarding and POP/IMAP> using this link Folow Steps :
4)Enable IMAP at google <Forwarding and POP/IMAP> using this link Folow Steps :
5)Define which email you want it to be server and which one you want it to be the client .
6)Enable the outlook or the other client account pop3 and IMAP