title: How to configur SMTP mailing on my hosting server in codeigniter?
body: <p>I m trying to send an automated email from my hosting server using codeigniter smtp, but here i m facing some error with AUTH LOGIN. Successfully i can able to sending mails in my localhost with gmail smtp host,  and gmail account (after allowing security for third-party apps). Here i m using webmail, so i help form you guys to fix my bugs. Thanks in Advance.</p>
  
  <p><strong>ERROR :-</strong>
  The following SMTP error was encountered: 0 php_network_getaddresses: getaddrinfo failed: Name or service not known
  Unable to send data: AUTH LOGIN
  Failed to send AUTH LOGIN command. Error: 
  Unable to send data: MAIL FROM:</p>
  
  <p>from: 
  The following SMTP error was encountered: 
  Unable to send data: RCPT TO:</p>
  
  <p>to: 
  The following SMTP error was encountered: 
  Unable to send data: DATA</p>
  
  <p>data: 
  The following SMTP error was encountered:     <strong>etc....</strong></p>
  
  <p><strong>Here is my code:-</strong></p>
  
  <pre><code>    $config['useragent']='CodeIgniter';
      $config['protocol']='smtp';
      $config['smtp_host']='ssl//mail.mydomain.com';
      $config['smtp_port']='587';
      $config['smtp_auth']=true;
      $config['smtp_timeout']='30';
      $config['smtp_user']= 'admin@mydomain.com';
      $config['smtp_pass']= 'mypassword';
      $config['charset']='utf-8';
      $config['newline']="\r\n";
      $config['wordwrap'] = TRUE;
      $config['mailtype'] = 'html';
      $this-&gt;email-&gt;initialize($config);
      $this-&gt;email-&gt;set_newline("\r\n");
      $this-&gt;email-&gt;from($from, $from_name);
      $this-&gt;email-&gt;reply_to($from, $from_name);
  </code></pre>