Hi, Very new to this program (literally 18hrs) and already i love it! I thought i'd attempt to add some hacked code to auto refresh the inbox...
[app.js] (before the '// set onload handler' add)
function refreshMailbox() { setTimeout("refreshMailbox()", 60000); return rcmail.command('list','INBOX'); return rcmail.mbox_mouse_up('INBOX'); }
(Then edit the function below) window.onload = function(e) { if (window.rcube_webmail_client) rcube_webmail_client.init(); // This calls the refreshMailbox() function. refreshMailbox(); };
This will sucessfully update the inbox and the folder list without reloading the page!
** UNFORTUNATLY ** When you go to read an email it starts refreshing loads of times... Does anyone know how i can get the property of 'rcmail.gui_object('message', 'message');' into my mailboxRefresh() function to create and IF statement?
Cheers! Jamie.
Hi Jamie,
A similar feature is already implemented in the current development version. The server responds with the new number of unread messages and delivers the headers for the new (recent) messages which will be added to the current message table.
You can check out the CVS TRUNK to get it.
Regards, Thomas
Jamie McConnell wrote:
Hi, Very new to this program (literally 18hrs) and already i love it! I thought i'd attempt to add some hacked code to auto refresh the inbox...
[app.js] (before the '// set onload handler' add)
function refreshMailbox() { setTimeout("refreshMailbox()", 60000); return rcmail.command('list','INBOX'); return rcmail.mbox_mouse_up('INBOX'); }
(Then edit the function below) window.onload = function(e) { if (window.rcube_webmail_client) rcube_webmail_client.init(); // This calls the refreshMailbox() function. refreshMailbox(); };
This will sucessfully update the inbox and the folder list without reloading the page!
** UNFORTUNATLY ** When you go to read an email it starts refreshing loads of times... Does anyone know how i can get the property of 'rcmail.gui_object('message', 'message');' into my mailboxRefresh() function to create and IF statement?
Cheers! Jamie.