getting this error while running saumys-classes.rf.gd/mail.php
Warning : require(vendor/autoload.php): failed to open stream: No such file or directory in /home/vol11_2/epizy.com/epiz_33817662/htdocs/mail.php on line 7
Fatal error : require(): Failed opening required ‘vendor/autoload.php’ (include_path=‘.:/usr/share/pear/’) in /home/vol11_2/epizy.com/epiz_33817662/htdocs/mail.php on line 7
my code
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;
// Load Composer’s autoloader
require ‘vendor/autoload.php’;
// Instantiation
$mail = new PHPMailer(true);
// Server settings
$mail->isSMTP();
$mail->SMTPDebug = 0;
$mail->Debugoutput = ‘html’;
$mail->Host = ‘smtp.gmail.com’;
$mail->SMTPAuth = true;
$mail->SMTPSecure= ‘tls’;
$mail->Port = 587;
$mail->Username = ‘ENTER YOUR GOOGLE ACCOUNT EMAIL’;
$mail->Password = ‘ENTER YOUR APP PASSWORD HERE’;
// Sender & Recipient
$mail->From = ‘ENTER YOUR GOOGLE ACCOUNT EMAIL’;
$mail->FromName = ‘SENDER NAME’;
$mail->addAddress(‘RECIPIENT EMAIL’);
// Content
$mail->isHTML(true);
$mail->CharSet = ‘UTF-8’;
$mail->Encoding = ‘base64’;
$mail->Subject = ‘Subject’;
$body = ‘This is a test message’;
$mail->Body = $body;
if($mail->send()){
echo ‘Success Message’;
exit;
}else{
echo ‘Error Message’;
exit;
}
?>