Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gmail POP3 not getting all messages in Java application

I have enabled POP3 settings for my gmail. I am able to connect to the POP3 store using my password in a Java app. I have around 10k messages in my inbox.

When I call getMessages on the Inbox folder it returns only 280 old messages. When I call getMessages in a loop, every call returns me same messages. I also tried getMessages(start, end) but it does not return other messages than those 280.

How do I retrieve the other messages?

like image 609
user2618875 Avatar asked Aug 12 '15 11:08

user2618875


People also ask

How do I make Gmail check POP3 more often?

With Gmail POP3 auto-refresh, you can refresh an unlimited number of POP3 email accounts at a rate of one minute for free. Click on the extension, it will open Gmail on the right page and automatically refresh POP3 emails.

Should Gmail be IMAP or POP?

IMAP and POP are both ways to read your Gmail messages in other email clients. IMAP can be used across multiple devices. Emails are synced in real time. POP can only be used for a single computer.

Can Gmail use POP3?

You can use the Gmail interface to send and receive emails using an email account you create with your domain. By setting up your domain's email address as a POP3 and SMTP account in your Gmail account, you can use Gmail as an email client (much like you would use Outlook, Mac Mail, or Thunderbird).


1 Answers

By default, GMail's POP3 and IMAP server does not behave like standard POP3 or IMAP servers and hides messages from clients using those protocols (as well as having other non-standard behavior).

If you want to configure your GMail POP3 or IMAP settings to behave the way POP3 and IMAP are intended to behave according to their protocol specifications, you'll need to log in to your GMail account via your web browser and navigate to the Forwarding and POP/IMAP tab of your GMail Settings page and set your options to look like this:

POP3 Download

[X] Enable POP for all mail (even mail that's already been downloaded)

IMAP Access

[X] Enable IMAP

[X] Auto-expunge off - wait for the client to update the server

[X] Immediately delete the message forever

like image 150
jstedfast Avatar answered Nov 15 '22 01:11

jstedfast