PHPMailer not found while updating HestiaCP

While updating Hestiacp 1.9.3 to 1.9.4 on Debian 12 I got the message

PHP Fatal error: Uncaught Error: Class “PHPMailer\PHPMailer\PHPMailer” not found in /usr/local/hestia/web/inc/main.php:456
Stack trace:
#0 /usr/local/hestia/web/inc/mail-wrapper.php(39): send_email()
#1 {main}
thrown in /usr/local/hestia/web/inc/main.php on line 456

This error was shown twice when it was suppose to send the two emails after upgrading, one confirming the upgrade and the other with the upgrade log

I searched for the folder PHPMailer on this server and on other servers and can’t find PHPMailer on any HestiaCP server with 1.9.3 or 1.9.4 versions

Once the folder PHPMailer does not exist on HestiaCP how was it suppose to use its class to send the emails?

It should be here /usr/local/hestia/web/inc/vendor/phpmailer/phpmailer

If you don’t have it, execute this command:

v-add-sys-dependencies

Thank you for the information.

I was not finding the folder because I searched for PHPMailer but is phpmailer

The folder exists and contains all the files, sizes and permissions as other HestiaCP web servers I have

What could be de cause for the upgrade script not being able to find the class?

I don’t know. But is it working fine now?

I requested a backup creation and got the email confirming it was done, however this error was on the process of apt upgrade so I am not sure if there is an issue with the upgrade script and I am not sure if the emails sent by the control panel use PHPMailer.

Is the PHPMailer used to send the control panel emails?

Yes, it is.

In that case it should be all good

Yes, seems so.

Thanks again!

1 Like