diff --git a/libraries/joomla/mail/helper.php b/libraries/joomla/mail/helper.php index e86e14c5be09e..31c3b35845eca 100644 --- a/libraries/joomla/mail/helper.php +++ b/libraries/joomla/mail/helper.php @@ -131,9 +131,8 @@ public static function isEmailAddress($email) return false; } - // No problem if the domain looks like an IP address, ish - $regex = '/^[0-9\.]+$/'; - if (preg_match($regex, $domain)) + // No problem if the domain looks like an IPv4 and IPv6 address + if (@inet_pton($domain)) { return true; }