Roundcube Community Forum

 

SEEN flag, where and how?

Started by Gooseman11, August 27, 2024, 12:25:15 PM

Previous topic - Next topic

Gooseman11

I am trying to cache the first ~10 emails from the mail-list to my sql database. So far the caching is working fine. However, i noticed RC uses the SEEN flag to recognize whether a mail is cached or not.

The RC codebase is quite big and I cant seem to figure out where RC decides to fetch the mail bodies from IMAP instead of my already fetched data from the sql database.

The thing is when i apply the SEEN flag to a message, everything works as intended. But without that flag it just tries to fetch the message as normal, from the IMAP server.

So far i think I have figured out I should look somewhere on the server-side, since it responds with the mail "preview" body, and the http requests look the same whether the message is SEEN (cached) or not, but this codebase is like a jungle to navigate through. Am I on the right track, or does anyone know where I should look around? Any help is very appreciated!