Author Topic: Integrating a new message icon  (Read 6614 times)

Offline dogcow

  • Jr. Member
  • **
  • Posts: 31
Integrating a new message icon
« on: December 11, 2006, 10:04:09 PM »
OK, so this isn't a full-blown request, per se, owing to the fact that I just need some guidance on what to do.

Here's what I want:

Some people may be familiar with my web site and its installation of Roundcube. One of the perks is a free email account that is activated upon sign up. This email account can be accessed by web mail. I've made a page to make web mail access easier- all one has to do is login to my site, click the email icon, enter their password again, and the Roundcube inbox automagically loads.

Now, what I want to do is make that icon "smart." A user would sign into his account. Without needing to open up Roundcube webmail, that email icon at the top of the page would change to reflect how many new unread emails his account has.

So I want, on each page load ( or perhaps have it cached for each session), to have the user logged into Roundcube, grab the number of new unread mails, then output that back to my main script. The icon would then change to show how many new emails there are. This would eliminate the extra step of having to login constantly to check if new mails are available; one could simply browse my site and be updated if any new email arrives.

I don't need anyone to program this for me, I can do it myself, I just need some pointers, some guides for which code to look through to log a user into Roundcube, grab the # of new mails, and spit that out into my main site's pages.

If you're not sure about what I want, or want to see my current email system in action, the link to my site is in my signature.

-Thanks!
« Last Edit: July 23, 2012, 01:19:57 PM by dogcow »

Offline mrJ

  • Newbie
  • *
  • Posts: 2
Re: Integrating a new message icon
« Reply #1 on: December 12, 2006, 08:44:31 AM »
this is something that i would be interested in getting onto my site as well - let me know how you get on... but I wouldn't know where exactly to start!

Offline yllar

  • Full Member
  • ***
  • Posts: 106
Re: Integrating a new message icon
« Reply #2 on: December 12, 2006, 09:03:16 AM »
you can do this via imap server. involving roundcube into it is almost same as using thunderbird to get unread message count.
see http://www.phptutorial.info/index.php?q=imap-status (php needs imap plugin, see http://ee2.php.net/manual/en/ref.imap.php)
irc://irc.freenode.net:6667/#roundcube