@@ 1834-1842 (lines=9) @@ | ||
1831 | ||
1832 | foreach ($hosts as $hostentry) { |
|
1833 | $hostinfo = []; |
|
1834 | if (!preg_match( |
|
1835 | '/^((ssl|tls):\/\/)*([a-zA-Z0-9\.-]*|\[[a-fA-F0-9:]+\]):?([0-9]*)$/', |
|
1836 | trim($hostentry), |
|
1837 | $hostinfo |
|
1838 | )) { |
|
1839 | static::edebug($this->lang('connect_host') . ' ' . $hostentry); |
|
1840 | // Not a valid host entry |
|
1841 | continue; |
|
1842 | } |
|
1843 | // $hostinfo[2]: optional ssl or tls prefix |
|
1844 | // $hostinfo[3]: the hostname |
|
1845 | // $hostinfo[4]: optional port number |
|
@@ 1850-1853 (lines=4) @@ | ||
1847 | // If it's not specified, the default value is used |
|
1848 | ||
1849 | //Check the host name is a valid name or IP address before trying to use it |
|
1850 | if (!static::isValidHost($hostinfo[3])) { |
|
1851 | static::edebug($this->lang('connect_host') . ' ' . $hostentry); |
|
1852 | continue; |
|
1853 | } |
|
1854 | $prefix = ''; |
|
1855 | $secure = $this->SMTPSecure; |
|
1856 | $tls = ('tls' == $this->SMTPSecure); |