I am capable of changing/adding code if I need to.
(Please note these setttings work with the MAIL engine)
Engine: SMTP
PARAM: -fmatthew@anewcreationgreetings.com
HOST: ssl://gator4161.hostgator.com
PORT: 465
T/O: 5
This is a connection error, but the host is correct and all the ports work ssl is setup etc. Here is the error:
Code: Select all
Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home4/cmatthewc/public_html/system/library/mail/smtp.php on line 87Warning: fsockopen(): unable to connect to ssl://gator4161.hostgator.com :465 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in /home4/cmatthewc/public_html/system/library/mail/smtp.php on line 87
Fatal error: Uncaught exception 'Exception' with message 'Error: php_network_getaddresses: getaddrinfo failed: Name or service not known (0)' in /home4/cmatthewc/public_html/system/library/mail/smtp.php:90 Stack trace: #0 /home4/cmatthewc/public_html/system/library/mail.php(142): Mail\Smtp->send() #1 /home4/cmatthewc/public_html/catalog/controller/mail/register.php(44): Mail->send() #2 [internal function]: ControllerMailRegister->index('account/custome...', Array, 5) #3 /home4/cmatthewc/public_html/system/engine/action.php(79): call_user_func_array(Array, Array) #4 /home4/cmatthewc/public_html/system/engine/event.php(62): Action->execute(Object(Registry), Array) #5 /home4/cmatthewc/public_html/system/engine/loader.php(255): Event->trigger('model/account/c...', Array) #6 [internal function]: Loader->{closure}(Array, Array) #7 /home4/cmatthewc/public_html/system/engine/proxy.php(47): call_user_func_array(Object(Closure), Array) #8 /home4/cmatthewc/public_html/catalog/controller/account/register.php(22): Proxy->__call('addCu in /home4/cmatthewc/public_html/system/library/mail/smtp.php on line 90
So, line 90 is a connection failure obviously. The code below gives the basic region in question. Line 90 is throwing an exception. Why would MAIL work fine and SMTP not? Please note I have gone over every conceivable configuration with the Host tech support and they are convinced it is OpenCart (might still be Host Gator but I digress...)
Code: Select all
if (substr($this->smtp_hostname, 0, 3) == 'tls') {
$hostname = substr($this->smtp_hostname, 6);
} else {
$hostname = $this->smtp_hostname;
}
$handle = fsockopen($hostname, $this->smtp_port, $errno, $errstr, $this->smtp_timeout);
if (!$handle) {
throw new \Exception('Error: ' . $errstr . ' (' . $errno . ')');
} else {