-->

php_network_getaddresses: getaddrinfo failed: Name

2020-05-10 08:19发布

问题:

I am using php mailer function but getting following error.How to fix it ?

2016-01-22 06:15:48 SMTP ERROR: Failed to connect to server: php_network_getaddresses: getaddrinfo failed: Name or service not known (0) Failed To Connect..!!

回答1:

It means your DNS is not working, or you've set your Host value to a non-existent host name. The PHPMailer docs provide ways of testing what the problem is.



回答2:

mostly your site has been blocked as you tried to send spam mails in bulk quantity. there is only one way to resolve this is by contacting the host and try to present your case that you did not try to spoil the network. if you can convince them they will unblock



回答3:

It means that either the address you are trying to connect to does not have a DNS entry, or your DNS is not working. Please read the troubleshooting guide. You also need to update your PHPMailer.

https://github.com/PHPMailer/PHPMailer/issues/340