title: login registration and verify email (gmail) codeigniter
body: <p>I have problems when sending email, I make registration and verification by email, when on localhost everything runs smoothly, there are no problems, but when I am hosting, the email function cannot, please help</p>
  
  <pre><code> $config = array(
          'protocol'  =&gt; 'smtp',
          'smtp_host' =&gt; 'ssl://smtp.gmail.com',
          'smtp_port' =&gt;  465,
          'smtp_user' =&gt; 'email@gmail.com', // change it to yours
          'smtp_pass' =&gt; 'mypassword', // change it to yours
          'mailtype'  =&gt; 'html',
          'charset'   =&gt; 'iso-8859-1',
          'wordwrap'  =&gt;  TRUE
          );
      $message =  "
      &lt;html&gt;
      &lt;head&gt;
      &lt;title&gt;Verifikasi Kode&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
      &lt;h2&gt;Terima kasih telah berpartisipasi.&lt;/h2&gt;
      &lt;p&gt;Akun anda:&lt;/p&gt;
      &lt;p&gt;Email: ".$email."&lt;/p&gt;
      &lt;p&gt;Untuk melanjutkan pendaftaran, mohon klik link yang kami berikan&lt;/p&gt;
      &lt;h4&gt;&lt;a href='".base_url()."register/aktivasi/".$id."'&gt;Activate My Account&lt;/a&gt;&lt;/h4&gt;
      &lt;/body&gt;
      &lt;/html&gt;
      ";
      $this-&gt;email-&gt;initialize($config);
      $this-&gt;load-&gt;library('email', $config);
      $this-&gt;email-&gt;set_newline("\r\n");
      $this-&gt;email-&gt;from($config['smtp_user']);
      $this-&gt;email-&gt;to($email);
      $this-&gt;email-&gt;subject('Signup Verification Email, abcd.com | No reply');
      $this-&gt;email-&gt;message($message);
      if($this-&gt;email-&gt;send()){
          $this-&gt;session-&gt;set_flashdata('msg','Kode Aktivasi telah dikirim ke email, mohon di cek');
      }
      else{
          $this-&gt;session-&gt;set_flashdata('msg', $this-&gt;email-&gt;print_debugger());
      }
  
      redirect('register',$data);
  }
  </code></pre>
  
  <blockquote>
    <p>Error : Failed to authenticate password. Error: 534-5.7.14 Please 534-5.7.14 log in via your web browser and then try again. 534-5.7.14 Learn more at 534 5.7.14 <a href="https://support.google.com/mail/answer/78754" rel="nofollow noreferrer">https://support.google.com/mail/answer/78754</a> 18sm13749594pfp.100 - gsmtp</p>
    
    <p>Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.</p>
  </blockquote>