Roundcube Community Forum

 

External "new mails" overview with redirect to RC

Started by MatBoy, June 12, 2011, 07:55:27 AM

Previous topic - Next topic

MatBoy

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 ?

SKaero

It is doable, you would need to be logged in to RoundCube at the time you get the emails to display in the widget.

MatBoy

OK thanks!

How would I receive the links to the emails itself ? it's not some sort of query I guess.

SKaero

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 to get a better feel for the calls.

MatBoy

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 :)

rosali

#5
./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 ...
Regards,
Rosali