improved setMessageFolders call