title: SMTP -> ERROR: AUTH not accepted from server: 530 5.7.0 Must issue a STARTTLS command first. c3sm5545732pax.9 - gsmtp PHPMailer
body: <p>i already check if openssl is used by my wamp server and it is check. But what is the problem of my code?</p>
  
  <blockquote>
    <p></p>
  </blockquote>
  
  <pre><code>$mail = new PHPMailer(true); 
  $body             = 'THIS IS YOUR USERNAME:'.$row['username'].' PASSWORD: '.$row['password'].'\n PLEASE DELETE THIS MESSAGE AFTER YOU READ THIS';
  $mail-&gt;SMTPDebug = 1;
  $mail-&gt;IsSMTP();                // tell the class to use SMTP
  $mail-&gt;SMTPAuth   = true;                  // enable SMTP authentication
  $mail-&gt;Port       = 587;                    // set the SMTP server port
  $mail-&gt;SMTPSecure = 'tsl'; 
  $mail-&gt;Host = 'smtp.gmail.com';
  $mail-&gt;Username   = "dan.villarea22@gmail.com";     // SMTP server username
  $mail-&gt;Password   = "password";            // SMTP server password
  $mail-&gt;AddReplyTo("system@dvts.com","ADMIN");
  $mail-&gt;From       = "system@dvts.com";
  $mail-&gt;FromName   = "SYSTEM";
  $to = "dan.villareal22@gmail.com";
  $mail-&gt;AddAddress($to);
  $mail-&gt;Subject  = "First PHPMailer Message";
  $mail-&gt;AltBody    = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
  $mail-&gt;WordWrap   = 80; // set word wrap
  $mail-&gt;MsgHTML($body);
  $mail-&gt;IsHTML(true); // send as HTML
  $mail-&gt;Send();echo 'Message has been sent.';
  </code></pre>