title: I am unable to send mail with PHPMailer
body: <p>This is my index.php file</p>
  
  <p>Please suggest what is wrong with the below code that i am not receiving mails or if there is any other easy way of sending emails.</p>
  
  <pre><code>&lt;?php
  
  $mail = new PHPMailer;
  $mail-&gt;isSMTP();
  $mail-&gt;SMTPAuth=false;
  $mail-&gt;SMTPSecure='tls';
  $mail-&gt;Host='smtp.gmail.com';
  $mail-&gt;port='587';
  $mail-&gt;isHTML();
  $mail-&gt;Username='demoXXXXX@gmail.com';
  $mail-&gt;Password='XXXXXX';
  $mail-&gt;SetFrom('no-reply@gmail.com');
  
  
  $mail-&gt;Subject = "Subject Text";
  $mail-&gt;Body = "&lt;i&gt;Mail body in HTML&lt;/i&gt;";
  
  
  $mail-&gt;addAddress("parkingston@gmail.com");
  
  if(!$mail-&gt;send()) 
  {
      echo "Mailer Error: " . $mail-&gt;ErrorInfo;
  } 
  else 
  {
      echo "Message has been sent successfully";
  }
  
  ?&gt;     
  </code></pre>