How to properly call dependency classes (Class not found) I'm creating a custom module that uses PHPMailer, which has been installed in the module's vendor folder via composer.

This is the error I get:

Error: Class 'PHPMailer' not found in Drupal\multisend\Service\MailerService-&gt;__construct()

PHPMailer is being used in a service class and a PHPMailer object is being created in the service classes constructor. Here is the code:

&lt;?php

namespace Drupal\multisend\Service;

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


class MailerService
{
    private $mailer;
    private $config;
    private $attorney_data;

    public function __construct($attorney_data)
    {
        $this-&gt;mailer = new PHPMailer(true);
        $this-&gt;config = \Drupal::config('multisend.settings');
        $this-&gt;attorney_data = $attorney_data;
    }

    ...


I've even tried require() on the PHPMailer class but no luck. If anyone could give any suggestions, I would appreciate it greatly.
Yes this is right the onlything is never try to composer require X in a modules directory even though you can include a composer.json file in the module its self 
always make sure you are in the site root. then the paths will be correct.