The main issue wasn’t with any of the server or the backend, the issue was with the function itself, mainly the parameter PHPMailer.
For some odd reason, you need to use
PHPMailer/PHPMailer/PHPMailer
or
use PHPMailer/PHPMailer/PHPMailer
at the top of the functions.php file.