PHP require_once php path? PHP require_once php path? apache apache

PHP require_once php path?


Your include_path is commented out

;include_path = ".:/usr/share/php"^ remove semicolon


Your directory is named libphp-phpmailer and in the require_once you name it libphp-PHPMailer (with upper case letters).


You're using an old version of PHPMailer and you're loading it in the wrong way. Please get the latest version and read the docs on loading, or add PHPMailer to your composer.json.

For a manual load you should do:

require '/path/to/PHPMailerAutoload.php';$mail = new PHPMailer;

As you're using composer (though you've commented it out), you don't even need to do that much since the composer autoloader will work.

You've also based your code on an old example, so I suggest you update that too using one of the examples provided.