title: Sent email appears in recipient's spam folder in cakePHP using gmail account?
body: <p>I am Using cakephp for one of my project. for sending email I am using cakeEmail. For that I created one gmail account for sending emails(i.e. used in code for send mail from that account).Mail sending works but sent mail appears recipient's spam folder.<br>
  Also in gmail account that mail dosen't appear sent mail folder.</p>
  
  <p>code is as bellow :</p>
  
  <p>In /app/Config/email.php file is :</p>
  
  <p>class EmailConfig {</p>
  
  <pre><code>    public $gmail = array(
          'host' =&gt; 'ssl://smtp.gmail.com',
          'port' =&gt; 465,
          'username' =&gt; 'username@gmail.com',
          'password' =&gt; 'password',
          'transport' =&gt; 'Smtp'
      );  
  </code></pre>
  
  <p>}</p>
  
  <p>and code in my controller file for password recovery is :</p>
  
  <p>public function  _sendemail($user_data,$temporary_password){</p>
  
  <pre><code>            $email = new CakeEmail();
              $email-&gt;config('gmail');
              $email-&gt;template('welcome', 'password_recovery_email'); //template
              $email-&gt;emailFormat('html');
              $email-&gt;viewVars(array(
                                 'temporary_password'=&gt;$temporary_password,
                                 'user_data'=&gt;$user_data
                              ));
              $email-&gt;from(array('username@gmail.com' =&gt; 'Password Recovery'));
              $email-&gt;to($user_data['User']['email_address']);
  
              $email-&gt;subject('password recovery email');
  
              $result=$email-&gt;send();
  
  
  
      }
  </code></pre>
  
  <p>Please tell me what should I do to get all sent emails to appears in inbox rather than spam folder.</p>
  
  <p>Thanks</p>