找不到类'phpmailer'的PHPMailer问题[重复]

致命错误:找不到类“ PHPMailer”

那是出现的错误,但是我已经尝试了一切。

                            $mail = new PHPMailer;
                            $mail->IsSMTP(); // Enable SMTP 
                            $mail->Host = "secret"; //SMTP server Take 163 mailbox as an example 
                            $mail->Port = 465; //email-sending-port 
                            $mail->SMTPAuth = true; //Enable SMTP authentication
                            $mail->SMTPSecure = 'ssl';

                            $mail->CharSet = 'UTF-8'; //character set 
                            $mail->Encoding = "base64"; //encoding style 

                            $mail->Username = "secret"; //your email 
                            $mail->Password = "secret"; //your password 
                            $mail->Subject = "secret"; //Mail Subject 

                            $mail->From = "secret"; //Sender address (aka your email) 
                            $mail->FromName = "secret"; //Sender Name
                            $mail->setFrom('secret', 'secret');

                            $address = $_POST['email'];//recipient email 
                            $mail->AddAddress($address, $_POST['username']);//Add recipient (address, nickname) 


                            $mail->IsHTML(true); //support html content 

                            $mail->Body = "<p>secret</p> ";

..这是在顶部:

require 'inc/pages/vendor/autoload.php';


use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;```