Implemented fetching of messages and storing of flags for ImapFolder