votar contra

favorita
Olá, estou tentando usar o PHPMailer no Centos 7 com o Composer. Estou usando o HTTPD (Apache) e o PHP-FPM. Quando tento executar o meu send.php ele apresenta esse erro:
PHP Fatal error: Class 'PHPMailer\PHPMailer\PHPMailer' not found in /var/www/html/1/send.php on line 10
LINE 10 $mail = new PHPMailer(true);
<?php
// Import PHPMailer classes into the global namespace
// These must be at the top of your script, not inside a function
usePHPMailer\PHPMailer\PHPMailer;
usePHPMailer\PHPMailer\Exception;

//Load composer's autoloader
require'vendor/autoload.php';

$mail
=newPHPMailer(true);// Passing `true` enables exceptions
try{
//Server settings
$mail
->SMTPDebug=2;// Enable verbose debug output
$mail
->isSMTP();

Já fiz a instalação do phpmailer com o composer, tudo funciona no meu localhost, mas no webserver não funciona.