I am trying to send and email for verification of a registration for my website i keep getting this error and I don't know how to fix it. These errors:
Warning: require(./vendor/autoload.php): Failed to open stream: No such file or directory in C:\xampp\htdocs\BUDGETING_WEBSITE\includes\signup.inc.php on line 7
Fatal error: Uncaught Error: Failed opening required './vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\BUDGETING_WEBSITE\includes\signup.inc.php:7 Stack trace: #0 {main} thrown in C:\xampp\htdocs\BUDGETING_WEBSITE\includes\signup.inc.php on line 7
I installed phpMailer using Composer through the terminal. This is my code:
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;
//Load Composer's autoloader
require 'vendor/autoload.php';
function sendemail_verify($full_name,$email,$verify_token)
{
$mail = new PHPMailer(true);
$mail->isSMTP(); //Send using SMTP
$mail->Host = 'smtp.gmail.com'; //Set the SMTP server to send through
$mail->SMTPAuth = true; //Enable SMTP authentication