<?php
use PHPMailer\PHPMailer\PHPMailer;
require 'vendor/autoload.php';
$mail = new PHPMailer;
$mail->isSMTP();
$mail->SMTPDebug = 2;
$mail->Host = 'mail.digitalhubsolution.com';
$mail->Port = 587;
$mail->SMTPAuth = true;
$mail->Username = 'aayush@digitalhubsolution.com';
$mail->Password = '_5$^V+$?$9^L';
$mail->setFrom('aayush@digitalhubsolution.com', 'Aayush Gaur');
$mail->addReplyTo('hitesh@qbupcloud.com', 'Hitesh Leekha');
$mail->addAddress('dhsanuj@gmail.com', 'Anuj Sharma');
$mail->Subject = 'Suggesting PHPMailer';
$mail->msgHTML(file_get_contents('message.html'), __DIR__);
$mail->Body = 'This is a plain text message body';
//$mail->addAttachment('test.txt');
if (!$mail->send()) {
    echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
    echo 'The email message was sent.';
}
?>
