Cannot Connect to Host Errors


You receive a POP3 Connection Error report email stating that one or more POP3 connections failed:

Error: cannot connect to host ; error = stream_socket_client(): unable to connect to tls:// (php_network_getaddresses: getaddrinfo failed: Name or service not known) (errno = 0 )

When you test the connection at Configuration () > System Settings > Support Departments, the test is unsuccessful.


The system cannot resolve the invalid or unreachable Hostname value in the support department’s mail importing configuration.


To resolve this issue:

  1. Go to Configuration () > System Settings > Support Departments.

  2. Edit the relevant support department.

  3. Make certain that you have entered the correct mail server hostname for Hostname. Check for blank spaces and spelling mistakes.

  4. Confirm that you have entered the correct IMAP or POP port number.

  5. Click Save Changes.

  6. Confirm that you can reach the mail server through your server’s command line. For example:

    telnet 995

In this example, success could return the following result:

    telnet 995          
    Connected to
    Escape character is '^]'.

The following response may indicate that your server cannot resolve the hostname:

    telnet 995
    Server lookup failure:, nodename nor servname provided, or not known

This could indicate a DNS misconfiguration on your server.

The following response may indicate that your server cannot connect to the hostname:

    telnet 995   
    Connection failed: Operation timed out

This could indicate that the mail server is currently unavailable or a firewall configuration is blocking the connection.

Contact your system administrator or network provider with these test results to investigate and resolve the connectivity issue.

Last modified: May 29, 2024