Added getMailboxes function