After upgrading EspoCRM 4.3.1 to 4.5.0 then Outbound emails stopped working. Here are following logs when I'll push "Send Test Email" button:
[2017-03-21 08:14:16] Espo.WARNING: E_WARNING: stream_socket_client(): php_network_getaddresses: getaddrinfo failed: No address associated with hostname {"code":2,"message":"stream_socket_client(): php_network_getaddresses: getaddrinfo failed: No address associated with hostname","file":"/var/www/vhosts/xxx/vendor/zendframework/zend-mail/src/Protocol/AbstractProtocol.php","line":203,"context":{"remot e":"ssl://smtp.xxx.yy:465","errorNum":0,"errorStr":""}} []
[2017-03-21 08:14:16] Espo.WARNING: E_WARNING: stream_socket_client(): unable to connect to ssl://smtp.xxx.yy:465 (php_network_getaddresses: getaddrinfo failed: No address associated with hostname) {"code":2,"message":"stream_socket_client(): unable to connect to ssl://smtp.xxx.yy:465 (php_network_getaddresses: getaddrinfo failed: No address associated with hostname)","file":"/var/www/vhosts/crm.xxx.yy/vendor/zendframework/zend-mail/src/Protocol/AbstractProtocol.php","line":203,"context":{"remot e":"ssl://smtp.xxx.yy:465","errorNum":0,"errorStr":""}} []
[2017-03-21 08:14:16] Espo.ERROR: API [POST]:/:controller/action/:action, Params:Array ( [controller] => Email [action] => sendTestEmail ) , InputData: {"server":"smtp.xxx.yy","port":465,"auth":true,"se curity":"SSL","username":"support@xxx.yy","passwor d":null,"fromName":"*****","fromAddress":"support@ xxx.yy","type":"outboundEmail","emailAddress":"use r.name@xxx.yy"} - Could not open socket [] []
[2017-03-21 08:14:16] Espo.ERROR: Display Error: Could not open socket, Code: 500 URL: /api/v1/Email/action/sendTestEmail [] []
And when I try to make new php fail for testing and it contains following code, then socket is working:
<?php
$h = stream_socket_client( 'ssl://smtp.xxx.yy:465', $errno, $errstr);
var_dump($h);
var_dump($errno);
var_dump($errstr);
DNS, hosts are correct. Any ideas?
[2017-03-21 08:14:16] Espo.WARNING: E_WARNING: stream_socket_client(): php_network_getaddresses: getaddrinfo failed: No address associated with hostname {"code":2,"message":"stream_socket_client(): php_network_getaddresses: getaddrinfo failed: No address associated with hostname","file":"/var/www/vhosts/xxx/vendor/zendframework/zend-mail/src/Protocol/AbstractProtocol.php","line":203,"context":{"remot e":"ssl://smtp.xxx.yy:465","errorNum":0,"errorStr":""}} []
[2017-03-21 08:14:16] Espo.WARNING: E_WARNING: stream_socket_client(): unable to connect to ssl://smtp.xxx.yy:465 (php_network_getaddresses: getaddrinfo failed: No address associated with hostname) {"code":2,"message":"stream_socket_client(): unable to connect to ssl://smtp.xxx.yy:465 (php_network_getaddresses: getaddrinfo failed: No address associated with hostname)","file":"/var/www/vhosts/crm.xxx.yy/vendor/zendframework/zend-mail/src/Protocol/AbstractProtocol.php","line":203,"context":{"remot e":"ssl://smtp.xxx.yy:465","errorNum":0,"errorStr":""}} []
[2017-03-21 08:14:16] Espo.ERROR: API [POST]:/:controller/action/:action, Params:Array ( [controller] => Email [action] => sendTestEmail ) , InputData: {"server":"smtp.xxx.yy","port":465,"auth":true,"se curity":"SSL","username":"support@xxx.yy","passwor d":null,"fromName":"*****","fromAddress":"support@ xxx.yy","type":"outboundEmail","emailAddress":"use r.name@xxx.yy"} - Could not open socket [] []
[2017-03-21 08:14:16] Espo.ERROR: Display Error: Could not open socket, Code: 500 URL: /api/v1/Email/action/sendTestEmail [] []
And when I try to make new php fail for testing and it contains following code, then socket is working:
<?php
$h = stream_socket_client( 'ssl://smtp.xxx.yy:465', $errno, $errstr);
var_dump($h);
var_dump($errno);
var_dump($errstr);
DNS, hosts are correct. Any ideas?