After reviewing the GitHub documentation thanks to a user of this community I confirm that there are two ways to include these libraries in the PHP code by composer or by assigning the path to the files that contain them in this way: ( which is the one that I have chosen)
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'path/to/PHPMailer/src/Exception.php';
require 'path/to/PHPMailer/src/PHPMailer.php';
require 'path/to/PHPMailer/src/SMTP.php';
In my case I have replaced path / to / by assets / which is where I have the resources.
In any case when executing the code the logfile returns this error:
[Tue Oct 17 10: 17: 10.331051 2017] [: error] [pid 3879] [client 192.168.0.184:50679] PHP Parse error: syntax error, unexpected 'use' (T_USE) in / var /www/test/sendMail.php on line 7