Threaded View

[SOLVED] Problem when displaying messages on home page

Hi, I tried to set a home page in Zimbra using portlets with the com_zimb_html zimlet, but there is some trouble with the display of my unread messages.

To show only unread messages, I get the instance of the MailboxManager - MailboxManager.getInstance() - then I get the list of MailItems in the Inbox folder of his mailbox, testing the isUnread() value of each MailItem.

This works fine in the first place, but when I read a message (from the Mail tab), and refresh my home page, it displays exactly the same number of messages as before. The refresh works because if I send a new mail to my user, the home page displays it in the unread messages, but every other mail I read are still here : the only way I have to show the right number of unread messages is to restart the instance of Zimbra...(it does not work if I juste clear cache or cookies of my browser).

Does anybody knows how to refresh my home page and getting the right value ? Thx.

I do a :
mbx.purge(MailItem.TYPE_MESSAGE);
(where mbx is an instance of my mailbox).