PHP trying to send mail securely - cannot find the PHPMailer class
问题 I started off with the following: composer require phpmailer/phpmailer Followed by placing require once require_once "../vendor/autoload.php"; Then $mail = new PHPMailer; That's where PHP has a fatal error: Fatal error: Class 'PHPMailer' not found The following is my code: use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; # require php mailer require_once "../vendor/autoload.php"; //PHPMailer Object $mail = new PHPMailer; $mail->isSMTP(); $mail->SMTPDebug = 3; $mail-