title: Sending email Codeigniter Error
body: <p>I'm trying to send email with my codeigniter project from my localhost, but it is always showing error like this:</p>
  
  <pre><code>    220 mx.google.com ESMTP pp9sm11498734pbb.65 - gsmtp 
  
  hello: 250-mx.google.com at your service, [202.43.95.33]
  250-SIZE 35882577
  250-8BITMIME
  250-AUTH LOGIN PLAIN XOAUTH XOAUTH2 PLAIN-CLIENTTOKEN
  250-ENHANCEDSTATUSCODES
  250-PIPELINING
  250-CHUNKING
  250 SMTPUTF8
  Failed to authenticate password. Error: 535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 http://support.google.com/mail/bin/answer.py?answer=14257 pp9sm11498734pbb.65 - gsmtp 
  from: 530-5.5.1 Authentication Required. Learn more at
  530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 pp9sm11498734pbb.65 - gsmtp
  The following SMTP error was encountered: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 pp9sm11498734pbb.65 - gsmtp 
  to: 530-5.5.1 Authentication Required. Learn more at
  530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 pp9sm11498734pbb.65 - gsmtp
  The following SMTP error was encountered: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 pp9sm11498734pbb.65 - gsmtp 
  data: 530-5.5.1 Authentication Required. Learn more at
  530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 pp9sm11498734pbb.65 - gsmtp
  The following SMTP error was encountered: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 pp9sm11498734pbb.65 - gsmtp 
  502 5.5.1 Unrecognized command. pp9sm11498734pbb.65 - gsmtp 
  The following SMTP error was encountered: 502 5.5.1 Unrecognized command. pp9sm11498734pbb.65 - gsmtp 
  Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
  User-Agent: CodeIgniter
  Date: Mon, 19 Jan 2015 12:49:08 +0100
  From: "andhika" &lt;mytest@gmail.com&gt;
  Return-Path: &lt;mytest@gmail.com&gt;
  To: coba@gmail.com
  Subject: =?utf-8?Q?test?=
  Reply-To: "mytest@gmail.com" &lt;mytest@gmail.com&gt;
  X-Sender: mytest@gmail.com
  X-Mailer: CodeIgniter
  X-Priority: 3 (Normal)
  Message-ID: &lt;54bcef349adf6@gmail.com&gt;
  Mime-Version: 1.0
  
  
  Content-Type: text/plain; charset=utf-8
  Content-Transfer-Encoding: 8bit
  
  world
  </code></pre>
  
  <p>This is my controller:</p>
  
  <pre><code>$this-&gt;load-&gt;library('email');
      $config = array(
                  'protocol'  =&gt;  'smtp',
                  'smtp_host' =&gt;  'ssl://smtp.googlemail.com',
                  'smtp_user' =&gt;  'mytest@gmail.com',
                  'smtp_pass' =&gt;  'youpassword',
                  'smtp_port' =&gt;  '465'
                  );
      $this-&gt;email-&gt;initialize($config);
      $this-&gt;email-&gt;set_newline('\r\n');
  
      $this-&gt;email-&gt;from('mytest@gmail.com', 'andhika');
      $this-&gt;email-&gt;to('coba@gmail.com');
      $this-&gt;email-&gt;subject('test');
      $this-&gt;email-&gt;message('world');
  
  
      if ($this-&gt;email-&gt;send()){
           echo 'Your e-mail has been sent';
      }         
      else{
          show_error($this-&gt;email-&gt;print_debugger());
      }
  </code></pre>
  
  <p>This is in my php.ini setting: extension=php_openssl.dll</p>
  
  <p>Any Answer?</p>
  
  <p>Many Thanks...</p>