Email Server - Problem

Hey everybody,

I tried to configure the Email-Server. When i klick on send Email i get this Error

php_network_getaddresses: getaddrinfo failed: Name or service not known #0

I’m using the Smtp mode to send Emails.

  • Lubuntu 16.04 - 64bit
  • Apache
  • MySQL (10.0.27)
  • PHP Version: 7.0.8
  • Nextcloud Version: 10.0.1 (stable)

mydomain.com/index.php/settings/integrity/failed don’t show any error.

Thanks for your help :slight_smile:

The error indicates that DNS resolution is not working. Make sure PHP is able to properly resolve names and IPs.

1 Like

How can i do this? :confused:

Hello,

If Nextcloud is configured to use SMTP, then double check the smtp server name for correctness. It’s possible there is a typo, which is causing the DNS lookup to try and find a non-existent domain. That would cause the above error.

For DNS resolution testing, you can use the ‘host’ command. For example, run ‘host example.com’ at the command prompt. It should return an IP address.

To test DNS resolution with PHP, try the following script. Add this to a file called test-dns.php and access it in your browser. It should display an IP.

<?php $ip = gethostbyname('example.com'); echo $ip; ?>

See http://php.net/manual/en/function.gethostbyname.php for details.

1 Like