I am trying to prefetch the first ~10 messages from an inbox, and save their IMAP data/bodies in my sql "cache" database.
Quite simply I would like to replicate the process of what is happening when you open an email for the first time.
I would preferably like to do this from my own plugin, and use built-in rc functions if possible.
Has anyone done this before, or could possibly guide me with a short snippet of what has to be done?
I have managed to gather the uid and mbox of my chosen emails, but i cant seem to figure out how I would fetch and save the necessary data.