Roundcube Community Forum

News and Announcements => General Discussion => Topic started by: MatBoy on June 12, 2011, 07:55:27 AM

Title: External "new mails" overview with redirect to RC
Post by: MatBoy on June 12, 2011, 07:55:27 AM
I'm thinking about an idea to have a small widget that shows me the last new emails in widget in some intranet.

The idea is when you click on a row of an email that you are redirected to the email itself in roundrube.

Is this an insane idea or doable ?
Title: External "new mails" overview with redirect to RC
Post by: SKaero on June 13, 2011, 01:05:55 AM
It is doable, you would need to be logged in to RoundCube at the time you get the emails to display in the widget.
Title: External "new mails" overview with redirect to RC
Post by: MatBoy on June 13, 2011, 06:35:15 AM
OK thanks!

How would I receive the links to the emails itself ? it's not some sort of query I guess.
Title: External "new mails" overview with redirect to RC
Post by: SKaero on June 13, 2011, 11:25:00 AM
You would need to write a plugin that does an IMAP call to get X number of email from the inbox, you may want to check some of the MyRoundCube plugins myroundcube - RoundCube Plugins - Google Project Hosting (http://code.google.com/p/myroundcube/) to get a better feel for the calls.
Title: External "new mails" overview with redirect to RC
Post by: MatBoy on June 13, 2011, 01:09:50 PM
OK thanks!

I have build some imap check widget in the past, not that difficult. I'm now figuring out how the uid for that mailbox is created. I think it's doable indeed.

Tips are always welcome :)
Title: External "new mails" overview with redirect to RC
Post by: rosali on June 13, 2011, 02:17:53 PM
./program/include/rcube_imap.php

The above class (rcube_imap) contains all methods you may want to use.

In a plugin environment just create an instance of Roundcube by ...

$rcmail = rcmail::get_instance();

Once created, you are able to access all the Roundcube IMAP methods by ...

$ret = $rcmail->imap->[method]([args]);
// process $ret ...

... just a tip ...