We tried to upgrade from 3.3.0.13 to 3.4.0.3 but got the following error: “[17-Oct-2023 05:32:27 UTC] PHP Fatal error: Uncaught Exception: Mailer driver isn’t specified in the application’s config in /home/…/public_html/lib/pkp/classes/core/PKPContainer.php:315.”
Our host has tried to upgrade but recognized a code issue, which is beyond the scope of their service. Our site does not use the PHPMailer. This is strange because all our previous upgrades were successful (with PHPMailer disabled).
========
In the PKPContainer.php file, I see the following lines:
- Retrieves default mailer driver depending on the configuration
*-
@throws Exception
*/
protected static function getDefaultMailer(): string
{
$default = Config::getVar(‘email’, ‘default’);if (!$default) {
throw new Exception(‘Mailer driver isn't specified in the application's config’);
}return $default;
}
the config file for the attempted upgrade includes the following lines:
-
; Enable SMTP authentication
; Supported smtp_auth: ssl, tls (see PHPMailer SMTPSecure)
; smtp_auth = ssl
; smtp_username = username
; smtp_password = password
;
; Supported smtp_authtype: RAM-MD5, LOGIN, PLAIN, XOAUTH2 (see PHPMailer AuthType)
; (Leave blank to try them in that order)
; smtp_authtype =
; The following are required for smtp_authtype = XOAUTH2 (e.g. GMail OAuth)
; (See Using Gmail with XOAUTH2 · PHPMailer/PHPMailer Wiki · GitHub)
; smtp_oauth_provider = Google
; smtp_oauth_email =
; smtp_oauth_clientid =
; smtp_oauth_clientsecret =
; smtp_oauth_refreshtoken =
; Enable suppressing verification of SMTP certificate in PHPMailer
; Note: this is not recommended per PHPMailer documentation
; smtp_suppress_cert_check = On
========
I tried to compare the settings in our current version 3.3.013, but there is no PKPContainer.php file in our current site. Our email services are still functional though.
Can 3.4.0.3 be installed without PHPMailer (since I want to keep it as it is), or what needs to be added to the PKPContainer.php and/or the config.inc.php?
Our config lines for the Mailer in 3.3.0.13:
=========
; Enable SMTP authentication
; Supported smtp_auth: ssl, tls (see PHPMailer SMTPSecure)
; smtp_auth = ssl
; smtp_username = username
; smtp_password = password
;
; Supported smtp_authtype: RAM-MD5, LOGIN, PLAIN, XOAUTH2 (see PHPMailer AuthType)
; (Leave blank to try them in that order)
; smtp_authtype =
; The following are required for smtp_authtype = XOAUTH2 (e.g. GMail OAuth)
; (See Using Gmail with XOAUTH2 · PHPMailer/PHPMailer Wiki · GitHub)
; smtp_oauth_provider = Google
; smtp_oauth_email =
; smtp_oauth_clientid =
; smtp_oauth_clientsecret =
; smtp_oauth_refreshtoken =
; Enable suppressing verification of SMTP certificate in PHPMailer
; Note: this is not recommended per PHPMailer documentation
; smtp_suppress_cert_check = On
=======
Thus, the failure is resulting from upgrading from 3.3.0.13 (without the PKPContainer.php) to 3.4.0.3 (that fails without this file) where the latter contains the PKPContainer.php file (referring to the config.inc.php file without PHPMailer setting.
Which files need to be edited for the installation to complete without PHPMailer? Even if we change, will future upgrades wipe out custom settings?
Any help would be appreciated. Thank you in advance! Arjun Sabharwal @asabhar