Class not found in my website files

Hello, I want to send emails from my site but I don’t know why I get an error indicating that my class is not found in my PHPMailer file. Here is the error I get: Fatal error: Uncaught Error: Class ‘PHPMailer’ not found in /home/vol10_8/ Stack trace: # 0 {main} thrown in /home/vol10_8/ on line 12 and my website:

Thanks in advance

Do you have the necessary PHPMailer files? Keep in mind that you cannot just “oh I want to use PHPMailer so I just new PHPMailer”. It is not a built-in function.


@superdiamant07 if you don’t know, InfinityFree also has its official version

Download here

instructions/readme is here


Yes, i have all phpmailer files

If you’re using Composer, did you make sure to require __DIR__."/vendor/autoload.php"; ?


It is also ok to just use require "vendor/autoload.php"; if the vendor folder is inthe same folder as your main index.php.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.