Enviado em 19/02/2018 - 11:51h
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);
https://i.stack.imgur.com/hBZuO.png
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);
<?phpArquivos no servidor
// Import PHPMailer classes into the global namespace
// These must be at the top of your script, not inside a function
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
//Load composer's autoloader
require 'vendor/autoload.php';
$mail = new PHPMailer(true); // Passing `true` enables exceptions
try {
//Server settings
$mail->SMTPDebug = 2; // Enable verbose debug output
$mail->isSMTP();
https://i.stack.imgur.com/hBZuO.png