0

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
  • 1
    What is the SMTP setting set to in php.ini? Commented Jan 22, 2016 at 6:56

3 Answers 3

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.

1

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

0

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.