title: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method
body: <p>i tried to send the mail using codeigniter framework.but it will raise the error "Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.</p>
  
  <pre><code>From: "prakash t" &lt;tprakashkce@gmail.com&gt;
  Return-Path: &lt;tprakashkce@gmail.com&gt;
  Reply-To: "tprakashkce@gmail.com" &lt;tprakashkce@gmail.com&gt;
  X-Sender: tprakashkce@gmail.com
  X-Mailer: CodeIgniter
  X-Priority: 3 (Normal)
  Message-ID: &lt;5aed4eed40506@gmail.com&gt;
  Mime-Version: 1.0
  Content-Type: text/plain; charset=UTF-8
  Content-Transfer-Encoding: 8bit
  =?UTF-8?Q?Test=20Mail?=
  hai this my test mail
  </code></pre>
  
  <p>"
  but no use</p>
  
  <p>here is mycode:</p>
  
  <p>public function sendMail(){</p>
  
  <pre><code>    $config = Array(
          'protocol' =&gt; 'mail',
          'smtp_host' =&gt; 'ssl://smtp.googlemail.com',
          'smtp_port' =&gt; 587,
          'smtp_user' =&gt; 'example@gmail.com',
          'smtp_pass' =&gt; '*********'
      );
  </code></pre>
  
  <p>I know it's duplicate question.but i didn't find solution for my question</p>
  
  <pre><code>    $this-&gt;load-&gt;library('email',$config);
  
      $this-&gt;email-&gt;set_newline("\r\n");
      $this-&gt;email-&gt;from('tprakashkce@gmail.com','prakash t');
      $this-&gt;email-&gt;to('tprakash11121996@gmail.com');
      $this-&gt;email-&gt;subject('Test Mail');
      $this-&gt;email-&gt;message('hai this my test mail');
  
      if($this-&gt;email-&gt;send()){
          echo "mail send succesfully";
      }
      else{
          show_error($this-&gt;email-&gt;print_debugger());
      }
  
  }
  </code></pre>