title: unable to send email with phpmailer with gmail account
body: <p>I readly feel confused why i test many many example and correct example to send email with php mailer with gmail account but it did not work,here is the error</p>
  
  <pre><code>&gt; 2015-04-21 07:06:50   CLIENT -&gt; SERVER: EHLO www.ariarules.com
   2015-04-21 07:06:50    CLIENT -&gt; SERVER: STARTTLS
   2015-04-21 07:06:50    CLIENT -&gt; SERVER: EHLO www.ariarules.com
   2015-04-21 07:06:50    CLIENT -&gt; SERVER: AUTH LOGIN
   2015-04-21 07:06:50    CLIENT -&gt; SERVER:
   2015-04-21 07:06:52    SMTP ERROR: Username command failed:   
   535          Incorrect authentication data
   2015-04-21 07:06:52    SMTP Error: Could not authenticate.
   2015-04-21 07:06:52    CLIENT -&gt; SERVER: QUIT
   2015-04-21 07:06:52    SMTP connect() failed.
   Mailer Error: SMTP connect() failed.
  </code></pre>
  
  <p>and my code</p>
  
  <pre><code>$mail = new PHPMailer(); // create a new object
  $mail-&gt;IsSMTP(); // enable SMTP
  $mail-&gt;SMTPDebug = 1; 
  $mail-&gt;SMTPAuth = true; // authentication enabled
  $mail-&gt;SMTPSecure = 'tls'; // secure transfer enabled REQUIRED for GMail
  $mail-&gt;Host = "smtp.gmail.com";
  $mail-&gt;Port = 587; // or 587
  $mail-&gt;IsHTML(true);
  $mail-&gt;Username = "googleaccount@gmail.com";
  $mail-&gt;Password = "pass";
  $mail-&gt;SetFrom("user@gmail.com");
  $mail-&gt;Subject = "Test";
  $mail-&gt;Body = "hello";
  $mail-&gt;AddAddress("user@gmail.com");
  if(!$mail-&gt;Send())
  {
  echo "Mailer Error: " . $mail-&gt;ErrorInfo;
  }
  else
  {
  echo "Message has been sent";
  }
  </code></pre>
  
  <p>at end it's better to know i test tls &amp; ssl with port 465 &amp; 587 but....</p>