Author Topic: unread mail count  (Read 3427 times)

Offline ikarias

  • Newbie
  • *
  • Posts: 3
unread mail count
« 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?

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,413
    • http://SKaero.com/
Re: unread mail count
« Reply #1 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.

Offline ikarias

  • Newbie
  • *
  • Posts: 3
Re: unread mail count
« Reply #2 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)

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
Re: unread mail count
« Reply #3 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.
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline ikarias

  • Newbie
  • *
  • Posts: 3
Re: unread mail count
« Reply #4 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 :)