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->__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:

<?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->mailer = new PHPMailer(true);         $  this->config = \Drupal::config('multisend.settings');         $  this->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.