If you cannot use Composer, you can download the source files manually.
<?php use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; phpmailer download
// Now you can instantiate PHPMailer $mail = new PHPMailer(true); ?> If you cannot use Composer, you can download
Since you don't have the Composer autoloader, you must manually require the files: If you cannot use Composer
After installing via Composer, you simply include the autoloader at the top of your script: