title: Codeigniter error :fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known
body: <p>I'm getting some error <em>fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known</em> when sending mail using phpmailer.</p>
  
  <p>I have two domains. When I try to send mail from my demo domain <code>https://www.cad180.com/karistore.in/get-free-quote</code>, the email I received successfully but when I try to do the same thing from original domain <code>https://www.karistore.in/get-free-quote</code> is saying message has been sent but in dev panel network zone it's showing <em>fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known</em>.</p>
  
  <p>I've downloaded the code from karistore.in and uploaded the same to my demo server. Again demo server sending the mail but original server giving an error.</p>
  
  <p>Is there anything I'm doing wrong?</p>