<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;

require 'PHPMailer/src/Exception.php';
require 'PHPMailer/src/PHPMailer.php';
require 'PHPMailer/src/SMTP.php';

function sendMail($to,$subject,$message){

$mail = new PHPMailer(true);

$mail->isSMTP();
$mail->Host = 'smtp.gmail.com';
$mail->SMTPAuth = true;
$mail->Username = 'acmecert@gmail.com';
$mail->Password = 'eoasohcigwctxbgd ';
//$mail->Password = 'gsxcbesejondrwuy';
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
$mail->Port = 587;

$mail->setFrom('acmecert@gmail.com','ACME Certifications');
$mail->addAddress($to);

$mail->isHTML(true);
$mail->Subject = $subject;
$mail->Body    = $message;

$mail->send();
}
?>