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);
    }
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);
    }
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 ) ; }
Encode all e-mail addresses within a string

@param string $email The string to encode
@return string The encoded string
Encode all e - mail addresses within a string