<?php

use phpmailer\PHPMailer\PHPMailer;
use phpmailer\PHPMailer\Exception;

require '../phpobjects/common/phpmailer/src/Exception.php';
require '../phpobjects/common/phpmailer/src/PHPMailer.php';
require '../phpobjects/common/phpmailer/src/SMTP.php';


$mail = new PHPMailer();
$mail->isSendmail();
//$mail->SMTPDebug = 4;

//$mail->Host = 'localhost';
//$mail->Port = 25;
//$mail->SMTPSecure = 'tls';
//$mail->SMTPAuth = 'true';
//$mail->Username = 'confirm@petsafe.com.au';
//$mail->Password = 'KeysoftN123';




$mail->setFrom('confirm@petsafe.com.au', 'Petsafe');
$mail->addReplyTo('confirm@petsafe.com.au', 'Petsafe');
$mail->addAddress('jmuffett@keysoft.com.au', 'John'); 

$mail->Subject = 'Test Email using PHPMailer';

$mail->isHTML(true);

$mailContent = 'message body';	
$mail->Body = $mailContent;

if($mail->send()){
    echo 'Message has been sent';
}else{
    echo 'Message could not be sent.';
    echo 'Mailer Error: ' . $mail->ErrorInfo;
}
?>
