title: Mail sending error in codeigniter
body: <p>I am trying to send email through Codeigniter email library form <strong>localhost</strong>. Below is my code.</p>
  
  <pre><code>$config = Array(
      'protocol' =&gt; 'smtp',
      'smtp_host' =&gt; 'ssl://smtp.googlemail.com',
      'smtp_port' =&gt; 465,
      'smtp_user' =&gt; 'shreesaipratik1@gmail.com',
      'smtp_pass' =&gt; 'xxxxxx',
      );
      $this-&gt;load-&gt;library('email', $config);
      $this-&gt;email-&gt;set_newline("\r\n");
      $this-&gt;email-&gt;from('shreesaipratik1@gmail.com');
      $this-&gt;email-&gt;to('shreesaipratik@gmail.com');
      $this-&gt;email-&gt;subject('Subject');
      $this-&gt;email-&gt;message('Sample message');
      if (!$this-&gt;email-&gt;send()) 
      {
          show_error($this-&gt;email-&gt;print_debugger()); 
      }
      else 
      {
          echo 'Your e-mail has been sent!';
      }
  </code></pre>
  
  <p>I am getting following errors:-</p>
  
  <p><strong>Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.</strong>  &amp;</p>
  
  <p>Severity: Warning</p>
  
  <p>Message: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()</p>
  
  <p>Filename: libraries/Email.php</p>
  
  <p>Line Number: 1896</p>
  
  <p>Backtrace:</p>
  
  <p>File: D:\xampp\htdocs\ajax\application\controllers\angular_http.php
  Line: 29
  Function: send</p>
  
  <p>File: D:\xampp\htdocs\ajax\index.php
  Line: 315
  Function: require_once</p>