Skip to content

Repeatedly retrieving message UID #471

Answered by mjs
octo-weilian asked this question in Q&A
Discussion options

You must be logged in to vote

Unfortunately, the EXISTS response isn't giving you a message sequence number, just the number of messages in the folder so you can't use the number sent with EXISTS the way you are.

In my experience it's best to just use any IDLE response as a signal that something changed and then use some other mechanism to figure out what changed. There is too much variation between servers to bother with interpreting specific IDLE responses.

I would suggest that given that UIDs always increase and should persist between sessions, you should track the highest previously seen UID in the folder and then use something like SEARCH UID 99:* (where 99 is the last seen highest UID for the folder) when an IDL…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by octo-weilian
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants