title: Failed to authenticate password. Error using codeigniter
body: <p>When i am trying to send mail using codeigniter "email" library it is giving an authentication error. I have already modified the "auth_username" and "auth_password" in "sendmail.ini" file. 
  I can't get any way from where I should start to solve the problem. Any help please....</p>
  
  <p><a href="https://i.stack.imgur.com/C3j62.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/C3j62.png" alt="Error image"></a></p>
  
  <pre><code>$config = Array(
          'protocol' =&gt; 'smtp',
          'smtp_host' =&gt; 'ssl://smtp.googlemail.com',
          // 'smtp_host' =&gt; 'localhost',
          // 'mailpath' =&gt; "/usr/bin/sendmail",
          'smtp_port' =&gt; '465',
          'smtp_user' =&gt; $sender,
          'smtp_pass' =&gt; $senderPass,
          'mailtype' =&gt; 'html',
          'charset' =&gt; 'iso-8859-1',
          'wordwrap' =&gt; TRUE
      );
  
      $this-&gt;load-&gt;library('email');
  
      $this-&gt;email-&gt;initialize($config);
  
      $this-&gt;email-&gt;set_newline("\r\n");
      $this-&gt;email-&gt;from($sender);
      $this-&gt;email-&gt;to($to);
      $this-&gt;email-&gt;subject($subject);
      $this-&gt;email-&gt;message($body);
      if(!$this-&gt;email-&gt;send())
      {
          show_error($this-&gt;email-&gt;print_debugger());
      } 
  </code></pre>