<?PHP
use PHPMailer\PHPMailer\Exception;
use PHPMailer\PHPMailer\PHPMailer;

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

$mail = new PHPMailer();


// $mail->SMTPDebug = 2;
$mail->Host = 'mail.smtp2go.com';
$mail->Port = 80;
$mail->SMTPSecure = 'tls';
$mail->SMTPAuth = True;

$mail->CharSet = 'UTF-8';

$mail->SMTPKeepAlive = true;

$mail->isSMTP();
$mail->Username = 'scott.reph@gmail.com';
$mail->Password = '9o2RNWcgZGbe';
$mail->From = 'scott@rightthumb.com';
$mail->FromName = "Test - Me";
$mail->addAddress("scott.reph@gmail.com", "Recepient Name");
$mail->addReplyTo("scott@rightthumb.com", "Reply");
$mail->isHTML(true);

$mail->Subject = "Test 000";
$mail->Body = "<i>Mail body in HTML</i>";
$mail->AltBody = "This is the plain text version of the email content";
$mail->msgHTML('<b>test</b>');

if(!$mail->send()) {
    echo "Mailer Error: " . $mail->ErrorInfo;
} else {
    echo "Message has been sent successfully";
}
?>