<?php
  use PHPMailer\PHPMailer\PHPMailer;
  use PHPMailer\PHPMailer\Exception;
  require 'PHPMailer-master/src/Exception.php';
  require 'PHPMailer-master/src/PHPMailer.php';
  require 'PHPMailer-master/src/SMTP.php';

  $mail = new PHPMailer();
  $mail->IsSMTP();

  $mail->SMTPDebug  = 0;  
  $mail->SMTPAuth   = TRUE;
  $mail->SMTPSecure = "tls";
  $mail->Port       = 25;
  $mail->Host       = "cs.annauniv.edu";
  $mail->Username   = "tshanmugam@cs.annauniv.edu";
  $mail->Password   = "sjcl#0072";

  $mail->IsHTML(true);
  $mail->AddAddress("shanmugamthandapani@gmail.com", "Shanmugam");
  $mail->SetFrom("tshanmugam@cs.annauniv.edu", "Prayatna Event");
  $mail->AddCC("sandhiya949@gmail.com", "Sandhiya");
  $mail->Subject = "Event Registration Accepted Email sent via Gmail SMTP Server using PHP Mailer";
  $content = "<b>This is a Test Email sent via Gmail SMTP Server using PHP mailer class.</b>";

  $mail->MsgHTML($content); 
  if(!$mail->Send()) {
    echo "Error while sending Email.";
    var_dump($mail);
  } else {
    echo "Email sent successfully";
  }
?>