diff options
Diffstat (limited to 'system/libraries/Email.php')
-rw-r--r-- | system/libraries/Email.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php index dd5477e05..0fcdbd83e 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -706,9 +706,9 @@ class CI_Email { * @param string * @return bool */ - public function valid_email($address) + public function valid_email($email) { - return (bool) preg_match('/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix', $address); + return filter_var($email, FILTER_VALIDATE_EMAIL); } // -------------------------------------------------------------------- |