protected function encodeEmail($email)
    {
        if ($email == '')
        {
            return '';
        }
        if (strpos($email, '@') === false)
        {
            return $email; // see #6241
        }
        $arrChunks = explode('@', $email);
        $strHost = array_pop($arrChunks);
        return implode('@', $arrChunks) . '@' . static::encode($strHost);
    }