Please forgive my ignorance. I am trying to install PHPMailer 6.0.1 under PHP 5.6 on Linux. My PHP installation is remote and I manage all my websites’ PHP via FTP (I typi
In version 6.02, each of the phpmailer modules contain the namespace PHPMailer\PHPMailer
declaration so the following works (no autoloader needed but this routine should be in /src
folder):
include($_SERVER['DOCUMENT_ROOT'].'/path_setup.php');
require_once ($_SERVER['DOCUMENT_ROOT'].'/php/PHPMailer/src/PHPMailer.php');
require_once ($_SERVER['DOCUMENT_ROOT'].'/php/PHPMailer/src/SMTP.php');
require_once ($_SERVER['DOCUMENT_ROOT'].'/php/PHPMailer/src/Exception.php');
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;
$mail = new PHPMailer(true);