I've been here since 9:15 AM DETERMINED to find others with the same problem I have. 95% of these PHPMailer look a lot like mine. The main difference is "MINE DOES NOT WORK!!" Please guys, take a "close"look at what I have and tell me where did I go wrong. (My coding below):
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'vendor/autoload.php';
$mail = new PHPMailer();
$mail->HOST = "smtp.gmail.com";
$mail->isSMTP();
$mail->SMTPAuth = true;
$mail->Username = "johnm010247@gmail.com";
$mail->Password = "xxxxxxxxxxxxxxxxxx";
$mail->SMTPSecure = 'ssl';
$mail->Port = 465;
$mail->Subject = "Test Email";
$mail->Body = "This Is Our Body.....";
$mail->setFrom("johnm010247@gmail.com", "Robert");
$mail->addAddress("mothers@bcbc-church.org", "Mothers Board");
if ($mail->send())
echo "Mail sent";
?>
I'm using PHPMailer 6.0