private function parseFlags() {
        $this->flags = FlagCollection::make([]);

        $this->client->openFolder($this->folder_path);
        $flags = imap_fetch_overview($this->client->getConnection(), $this->uid, IMAP::FT_UID);
        if (is_array($flags) && isset($flags[0])) {
            foreach($this->available_flags as $flag) {
                $this->parseFlag($flags, $flag);
            }
        }
    }