public function mailboxes($mailboxSearch = '*', $withConnection = false)
    {
        $connectionString = $this->connectionString();
        $stream = imap_open($connectionString, $this->user, $this->password);
        $mailboxes = imap_list($stream, $connectionString, $mailboxSearch);

        if ($withConnection) {
            return $mailboxes;
        }

        return array_map(function ($mailbox) use ($connectionString) {
            return str_replace($connectionString, '', $mailbox);
        }, $mailboxes);
    }