src/Utilities/Regex.php
public static function isValidEmail($email)
    {
        /*
         * Not a string?
         * Nothing to do
         */
        if (!is_string($email)) {
            return false;
        }

        $pattern = self::getEmailPattern();

        return (bool)preg_match($pattern, $email);
    }
public static function isValidEmail($email)
    {
        /*
         * Not a string?
         * Nothing to do
         */
        if (!is_string($email)) {
            return false;
        }

        $pattern = self::getEmailPattern();

        return (bool)preg_match($pattern, $email);
    }
public static function isValidEmail ( $ email ) { /*
         * Not a string?
         * Nothing to do
         */ if ( ! is_string ( $ email ) ) { return false ; } $ pattern = self :: getEmailPattern ( ) ; return ( bool ) preg_match ( $ pattern , $ email ) ; }
Returns information if given e-mail address is valid

@param string $email E-mail address to validate / verify
@return bool

Examples:
a) valid e-mails:
- ni@g-m.pl
- ni@gm.pl
- ni@g_m.pl
b) invalid e-mails:
- ni@g-m.p
- n@g-m.pl
Returns information if given e - mail address is valid