Email Invoice - An uncaught Exception was encountered

When I tried to email invoice I get the following errors:

An uncaught Exception was encountered
Type: Error

Message: Class ‘PHPMailer\PHPMailer\PHPMailer’ not found

Filename: /var/www/clients/client3/web2/web/invoices/application/modules/mailer/helpers/phpmailer_helper.php

Line Number: 38


File: /var/www/clients/client3/web2/web/invoices/application/helpers/mailer_helper.php
Line: 76
Function: phpmail_send

File: /var/www/clients/client3/web2/web/invoices/application/modules/mailer/controllers/Mailer.php
Line: 162
Function: email_invoice

File: /var/www/clients/client3/web2/web/invoices/index.php
Line: 325
Function: require_once

Did you download the app from the website?

yes, from here: and followed update instructions from here, General upgrade information

Please check that the file application/modules/mailer/helpers/phpmailer_helper.php looks exactly like this file

thank you!
I actually copied content of the file from your link to my /web/invoices/application/modules/mailer/helpers/phpmailer_helper.php
and pasted it into my php file, I get same error.

Then please verify that the following files exist:

  • vendor/phpmailer/phpmailer/src/PHPMailer.php
  • vendor/autoload.php