title: Sending Activation Email , SMTP server did not accept the password
body: <p>I'm sending an email using CakePHP and I got an Error: <code>SMTP server did not accept the password</code>, along with an email in my inbox says that: <code>sign-in attempt blocked! , we recently blocked a sign-in attempt to your Google Account</code>.</p>
  
  <p>Is that normal?</p>
  
  <p>I'm using Xampp.</p>
  
  <pre><code>function sendActivationEmail($user_id)    
  {   
      Debugger::dump($user_id);
  
      $user = $this-&gt;User-&gt;findById($user_id);
  
      if ($user==false) 
      {
          debug(__METHOD__." failed to retrieve User data for user.id: {$user_id}");
          return false;
      } 
      $this-&gt;set('username', $this-&gt;data['User']['username']);
      $this-&gt;Email-&gt;to = $user['User']['email'];
      $this-&gt;Email-&gt;subject = env('SERVER_NAME').'- Please confirm your email address';
      $this-&gt;Email-&gt;from = 'laurent@gmail.com';
      $this-&gt;Email-&gt;template = 'account_verification';
      $this-&gt;Email-&gt;delivery = 'smtp';
      $this-&gt;Email-&gt;smtpOptions = array(
      'port'=&gt;'465',
      'timeout'=&gt;'30',
      'host' =&gt; 'ssl://smtp.gmail.com',
      'username'=&gt;'laurent@gmail.com',
      'password'=&gt;1234567
      );
      $this-&gt;Email-&gt;sendAs = 'text';  
      return $this-&gt;Email-&gt;send();
  
  }
  </code></pre>