title: Failed to authenticate password. Error: 535-5.7.8 Username and Password not accepted
body: <p>I send mail using CodeIgniter, but it returns this error:</p>
  
  <blockquote>
    <p>Failed to authenticate password. Error: 535-5.7.8 Username and
    Password not accepted</p>
  </blockquote>
  
  <p>Here is my code: </p>
  
  <pre><code> $this-&gt;load-&gt;library('email');
          $config = Array(
              'protocol' =&gt; 'smtp',
              'smtp_host' =&gt; 'ssl://smtp.googlemail.com',
              'smtp_port' =&gt; 587,
              'smtp_user' =&gt; 'my@gmail.com',
              'smtp_pass' =&gt; 'mypass',
              'mailtype'  =&gt; 'html',
              'charset'   =&gt; 'iso-8859-1'
          );
          $this-&gt;load-&gt;library('email', $config);
          $this-&gt;email-&gt;from('my@gmail.com');
          $this-&gt;email-&gt;to('send@gmail.com');
          $this-&gt;email-&gt;subject('This the test');
          $this-&gt;email-&gt;message('this is the test message');
          if (!$this-&gt;email-&gt;send())
          {
              echo $this-&gt;email-&gt;print_debugger();
  
          }
  </code></pre>
  
  <p>I've configured my Xampp server using this question: <a href="https://stackoverflow.com/questions/15965376/how-to-configure-xampp-to-send-mail-from-localhost">How to configure XAMPP to send mail from localhost?</a></p>