rabin 2 years ago
parent
commit
dee6ba3824
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/PHPMailer.php

+ 1 - 1
src/PHPMailer.php

@@ -3628,7 +3628,7 @@ class PHPMailer
             //Is it a valid IPv4 address?
             return (bool) filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4);
         }
-        if (filter_var('http://' . $host, FILTER_VALIDATE_URL, FILTER_FLAG_HOST_REQUIRED)) {
+        if (preg_match('/http:\/\/[\w.]+[\w\/]*[\w.]*\??[\w=&\+\%]*/is','http://' . $host)) {
             //Is it a syntactically valid hostname?
             return true;
         }