Roundcube Community Forum

SVN Releases => Requests => Topic started by: ikarias on February 03, 2014, 01:06:48 PM

Title: unread mail count
Post by: ikarias on February 03, 2014, 01:06:48 PM
For a site i'm building i'd like the admin to see, after logging in, the number of unread mails. There doesnt seem to be that feature however.

Any chance that will be fixxed?
Title: Re: unread mail count
Post by: SKaero on February 03, 2014, 01:42:36 PM
I'm not sure what your asking for, the unread mail count shows in the folder list.
Title: Re: unread mail count
Post by: ikarias on February 08, 2014, 03:09:17 AM
I'd like to build a small piece of code that i can place on a site. After login on that site, the code only shows the number of unread messages, without first loading roundcube.

I can imagine roundcube has a SQL storage of the mails in it's listing. So what i'm asking for is basicly a way to check the current imap_check to whats in the database (keeping in account any read/unread flag)
Title: Re: unread mail count
Post by: ABerglund on February 08, 2014, 11:27:16 AM
No, I don't think RC stores that in the DB, but queries the IMAP server for the number on each page refresh.

And even if RC did store it, the number would be stale if the user was not logged into RC, as there is no way for RC to fresh it as new mail arrives without a login.

To get an accurate, current count for your other site, you'll probably need to figure a way to query the IMAP server itself as well. You might be able to leverage the RC framework and code to do so, but I doubt that the job will be trivial.
Title: Re: unread mail count
Post by: ikarias on February 09, 2014, 07:19:19 AM
tnxx for the advice. It makes sense to me (amazing :o), and asking the imap server doesnt seem to do the trick. So, back to the drawing board :)