2

BACKGROUND

  • First time using Pop3.
  • Using OpenPop library.
  • Have configured Gmail to work with Pop3.

PROBLEM

Have been debugging code to see what happens (and try to get body text). Messages downloaded first 2 or 3 times.. got the UIDs with this:

var uids = client.GetMessageUids();

This time, it is no longer fetching any UIDs and I can't figure out why. Note, I did prematurely terminate the app a couple of times. My Gmail settings are configured to keep the mails on the server even after downloading them with a pop client. I even tried setting some mails to unread status in the hope that would work, but it doesn't.

So, any ideas what would cause this method to stop working after 2 or 3 goes? Does Gmail have some kind of security issue or maybe know that this client has acquired the messages already and doesn't send the messages anymore or what?

EDIT

I sent an email to that address and now it does show 1 message. So what I really need to know is HOW does the client (or Gmail) know which messages have been downloaded or not? This is very important, because if an error occurs and I cannot store the email for my app, the next time a refresh is done, the message will not be downloaded again and so messages will be missing from the application. Is there a way to reset it? Where is this being recorded?

Matt
  • 6,787
  • 11
  • 65
  • 112

1 Answers1

2

OpenPop does not store anything about messages by itself. It simply fetches whatever you tell it to. Gmail is a strange POP3 provider, as seen in What non-standard behaviour features does Gmail exhibit, when it is programmatically used as a POP3 server?

Gmail does not present the same message if it has been downloaded by any POP3 client. You could use the recent:username login method to see the last 30 days worth of email always.

Community
  • 1
  • 1
foens
  • 8,642
  • 2
  • 36
  • 48