Author Topic: Refresh folders list  (Read 3427 times)

Offline GO3LIN

  • Newbie
  • *
  • Posts: 8
Refresh folders list
« on: April 06, 2015, 10:58:32 AM »
Hello,

I'm creating a plugin for multiple accounts, a user can create an identity with imap settings. When I switch identities, I call $RCMAIL->output->command('refresh'); But this line didn't refresh my folders list. Do you have any idea on how I can refresh my folders list ?

EDIT : I solved this by clearing the mailboxes cache and reloading the whole page in the callback function. Here's the code used:

Code: [Select]
$storage = $RCMAIL->get_storage();
$storage->clear_cache('mailboxes', true);

and in the callback function i used a simple reload:

Code: [Select]
location.reload();
Gracefully
« Last Edit: April 06, 2015, 12:38:23 PM by GO3LIN »