Sending email with PHPMailer

It appears most of the examples out there relate to version 5.2. The current version is 6 and I had to make the following change in order to get it to work. Everything else from the examples worked.

Change:

$mail = new PHPMailer();

To:

$mail = new PHPMailer\PHPMailer\PHPMailer();

I’ll post (or edit this post) a full example shortly.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.