Auto Inbox Refresh (Email Checking)

Jamie McConnell jamie at blue44.com
Thu Jan 12 12:38:55 CET 2006


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.





More information about the Dev mailing list