Add to Favourites Add to Favourites    Print this Article Print this Article

Error connecting to IMAP server: localhost : php_network_getaddresses: getaddrinfo failed: Name or service not

If you get the following error:

Error connecting to IMAP server: localhost.
0 : php_network_getaddresses: getaddrinfo failed: Name or service not  known

It usually means that the following code is missing from your /etc/hosts file.

127.0.0.1 localhost

Edit the /etc/hosts file and ensure it's present.

Was this answer helpful?

Also Read