Added max threads, max messages, and whether to get all or just unread messages