diff --git a/class.phpmailer.php b/class.phpmailer.php index 52c0e52d..9c18c740 100644 --- a/class.phpmailer.php +++ b/class.phpmailer.php @@ -1622,7 +1622,7 @@ class PHPMailer foreach ($hosts as $hostentry) { $hostinfo = array(); - if (!preg_match('/^((ssl|tls):\/\/)*([a-zA-Z0-9\.-]*):?([0-9]*)$/', trim($hostentry), $hostinfo)) { + if (!preg_match('/^((ssl|tls):\/\/)*([a-zA-Z0-9:\[\]\.-]*):?([0-9]*)$/', trim($hostentry), $hostinfo)) { // Not a valid host entry continue; }