Home » Php » PHPMailer gives this page isn't working (HTTP ERROR 500)

PHPMailer gives this page isn't working (HTTP ERROR 500)

Posted by: admin October 29, 2018 Leave a comment

Questions:

I installed PHPMailer 6.01 and added the following lines to the PHP script,

use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;

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

$mail = new PHPMailer(true); 

The page loading in browser ends up with the error message:

HTTP ERROR 500 This page is not working

Should I set any path somewhere?

Solved the problem by setting the full path autoload.php.

Answers: