I want to use minimal features of phpmailer
. this is my folder structure:
webroot/
- php/
- mail.php
- phpmailer/
- PHPMailer.php
in my mail.php
, i want to use the namespace:
<?php
use PHPMailer\PHPMailer;
$mail = new PHPMailer(true);
...
But I got error:
Fatal error: Class 'PHPMailer\PHPMailer' not found in /home/example/public_html/php/mail.php on line 2
How can I resolve this?