So heres the situation, i call mail_fetch_flags() on "1:*" to have c-client fetch flags on all messages in a folder, I then loop over each message number and call mail_elt() on it, and use the returned info for getting my information about a messages flags. This works great the first time through. However, if I do this again after modifying the flags on the server (for instance, \Seen), the return from mail_elt() still has the old flag info
Either you have not modified the flags on the server, or the server is broken.
(despite having called mail_fetch_flags() again).
Calling mail_fetch_flags() again is a waste of network bandwidth. All it does is slow down your client. The IMAP protocol automatically updates flags on the client.
Once the cache is loaded, it stays loaded and current.
The *only*, and I do mean *only*, reason *ever* to call mail_fetch_flags() is if you intend to reference flags in your client without otherwise touching at the message. In that case, and that case *only*, the cache may not have been loaded.
Calling mail_fetch_flags() on "1:*" is generally a very bad idea. There is almost always a better way to do what you intend.
-- Mark --
http://staff.washington.edu/mrc Science does not emerge from voting, party politics, or public debate. Si vis pacem, para bellum.
