Email Invoice - An uncaught Exception was encountered

v1.5.9
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

Backtrace:

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: https://invoiceplane.com/downloads and followed update instructions from here, https://wiki.invoiceplane.com/en/1.5/getting-started/updating-ip 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