public static function encodeEmail($strEmail)
	{
		if ($strEmail == '')
		{
			return '';
		}

		if (strpos($strEmail, '@') === false)
		{
			return $strEmail; // see #6241
		}

		$arrChunks = explode('@', $strEmail);
		$strHost = static::encode(array_pop($arrChunks));

		if ($strHost == '')
		{
			return '';
		}

		return implode('@', $arrChunks) . '@' . $strHost;
	}
public static function encodeEmail($strEmail)
	{
		if ($strEmail == '')
		{
			return '';
		}

		if (strpos($strEmail, '@') === false)
		{
			return $strEmail; 
		}

		$arrChunks = explode('@', $strEmail);
		$strHost = static::encode(array_pop($arrChunks));

		if ($strHost == '')
		{
			return '';
		}

		return implode('@', $arrChunks) . '@' . $strHost;
	}
public static function encodeEmail ( $ strEmail ) { if ( $ strEmail == '' ) { return '' ; } if ( strpos ( $ strEmail , '@' ) === false ) { return $ strEmail ; // see #6241 } $ arrChunks = explode ( '@' , $ strEmail ) ; $ strHost = static :: encode ( array_pop ( $ arrChunks ) ) ; if ( $ strHost == '' ) { return '' ; } return implode ( '@' , $ arrChunks ) . '@' . $ strHost ; }
Encode the domain in an e-mail address

@param string $strEmail The e-mail address

@return string The encoded e-mail address
Encode the domain in an e - mail address