title: SMTP server did not accept the password
body: <p>I had written following code to send email.</p>
  
  <pre><code>static function sendEmail($email,$data,$type){
  
  
      $Email = new CakeEmail();       
      $Email-&gt;config('general');
      switch($type){
          case 1:
              $Email-&gt;template('confirmation_free', null);
              $Email-&gt;subject('Confirmation of registration with XXXXXXXXXXXXX');
              $Email-&gt;viewVars(array('Email'=&gt;$data["Email"],'full_name'=&gt;$data['full_name'],'Id'=&gt;$data['Id'],'url'=&gt;$_SERVER['SERVER_NAME'], 'password'=&gt;$data['password']));
              break;
          case 2:
              $Email-&gt;template('group-invite', 'default');
              $Email-&gt;subject('XXXXXXXX Group Invite - Notification');
              $Email-&gt;viewVars(array('Email'=&gt;$data["Email"],'Username'=&gt;$data['Username'],'Id'=&gt;$data['Id'],'url'=&gt;$_SERVER['SERVER_NAME']));
              break;
          case 3:
              $Email-&gt;template('forgot_password', null);
              $Email-&gt;subject('XXXXXXXX - Forgot Password');
              $Email-&gt;viewVars(array('Email'=&gt;$data["Email"],'Key'=&gt;$data['Key'],'url'=&gt;$_SERVER['SERVER_NAME'],'Id'=&gt;$data['id']));
              break;
      }
      $Email-&gt;to($email);
      if($Email-&gt;send())
          return true;
      else
          return false;
  }
  </code></pre>
  
  <p>with following sendgrid smtp settings.</p>
  
  <pre><code>public $general = array(
      'transport' =&gt; 'Smtp',
      'from' =&gt; array('XXXXX@XXXXXXX' =&gt; 'XXXXXX Administrator'),
      'host' =&gt; 'smtp.sendgrid.net',
      'port' =&gt; 587,
      'timeout' =&gt; 30,
      'username' =&gt; 'XXXXXXX',
      'password' =&gt; 'XXXXXX',
      'client' =&gt; null,
      'log' =&gt; false,
      'emailFormat' =&gt; 'html'
  );
  </code></pre>
  
  <p>It was working perfectly fine on my local and dev server. But after we installed SSL on the dev server, it started throwing following error "SMTP server did not accept the password "</p>
  
  <p>Please note that I'm using a sendgrid free account. Do I need a paid account to send emails from a server with SSL?</p>