diff -up ./class.phpmailer.php.rpm ./class.phpmailer.php --- ./class.phpmailer.php.rpm 2020-03-19 15:29:37.000000000 +0100 +++ ./class.phpmailer.php 2021-03-26 10:33:39.989407757 +0100 @@ -1534,6 +1534,7 @@ class PHPMailer public function getSMTPInstance() { if (!is_object($this->smtp)) { + require_once 'class.smtp.php'; $this->smtp = new SMTP; } return $this->smtp; @@ -1795,7 +1796,7 @@ class PHPMailer ); if (empty($lang_path)) { // Calculate an absolute path so it can work if CWD is not here - $lang_path = dirname(__FILE__). DIRECTORY_SEPARATOR . 'language'. DIRECTORY_SEPARATOR; + $lang_path = '/usr/share/PHPMailer/language/'; } //Validate $langcode if (!preg_match('/^[a-z]{2}(?:_[a-zA-Z]{2})?$/', $langcode)) { diff -up ./PHPMailerAutoload.php.rpm ./PHPMailerAutoload.php --- ./PHPMailerAutoload.php.rpm 2021-03-26 10:34:09.218276732 +0100 +++ ./PHPMailerAutoload.php 2021-03-26 10:34:35.311159763 +0100 @@ -30,20 +30,4 @@ function PHPMailerAutoload($classname) } } -if (version_compare(PHP_VERSION, '5.1.2', '>=')) { - //SPL autoloading was introduced in PHP 5.1.2 - if (version_compare(PHP_VERSION, '5.3.0', '>=')) { - spl_autoload_register('PHPMailerAutoload', true, true); - } else { - spl_autoload_register('PHPMailerAutoload'); - } -} else { - /** - * Fall back to traditional autoload for old PHP versions - * @param string $classname The name of the class to load - */ - function __autoload($classname) - { - PHPMailerAutoload($classname); - } -} +spl_autoload_register('PHPMailerAutoload', true, true);