“Cannot declare class PHPMailer\PHPMailer\SMTP” conflict mit WP Mail SMTP
-
Hello,
Wordpress: Version 5.6
WP Mail SMTP: Version 2.5.1
Events Manager: Version 5.9.8.1
Events Manager Pro: Version 2.5.1After I have updated WP, WP Mail SMTP and Events Manager, I have got this PHP error
18#18: *83002 FastCGI sent in stderr: “PHP message: PHP Fatal error: Cannot declare class PHPMailer\PHPMailer\SMTP, because the name is already in use in /usr/share/nginx/html/wp-includes/PHPMailer/SMTP.php on line 30” while reading response header from upstream
I use Contact form 7 with WP Mail SMTP, and using EventManager’s STMP for EM.
For a long time it worked without any problems, but after the update all of this happened.
When I deactivated WP Mail STMP EM working but Contact form 7 did not. otherwise activated the both plugins Contact form 7 working but EM not.
I think the problem is in
“wp-content/plugins/events-manager/classes/em-mailer.php”
EM_Mailer::load_phpmailer() line 146public function load_phpmailer(){
require_once ABSPATH . WPINC . ‘/class-phpmailer.php’;
require_once ABSPATH . WPINC . ‘/class-smtp.php’;
}Your plugin calls deprecated files
/**
* The PHPMailer class has been moved to the wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace.
*//**
* The SMTP class has been moved to the wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace.
*/Best Regrds,
Mishael Azer
- The topic ‘“Cannot declare class PHPMailer\PHPMailer\SMTP” conflict mit WP Mail SMTP’ is closed to new replies.