• Resolved mishaelazer

    (@mishaelazer)


    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.1

    After 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 146

    public 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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter mishaelazer

    (@mishaelazer)

    To whom still struggling with this problem, I have got an answer from EM plugin page.

    As far as I’m aware, the plugin should still work, however we have already fixed this in our local codebase and the fix should be out in the next update, which I hope will happen by next week, we may well release a dev version of the plugin even today to address some other issues.

    Another alternative is switching to WP Mail so that mails go via WP Mail SMTP, temporarily.

    Best Regards,

    Hello,

    Thank you for your response. We’re currently aware of the PHPMailer issues and this is will be addressed on the future release. You can also try checking this snippet as it should fix the PHPMailer issue. https://pastebin.com/ZJCYwNtE

    Thread Starter mishaelazer

    (@mishaelazer)

    Hello,
    thanks for your response.
    I have used your snippet and it work again :).

    Waiting ….. for new release !!!

    Best Regards

    Hello,

    I’m glad that it’s working now. ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘“Cannot declare class PHPMailer\PHPMailer\SMTP” conflict mit WP Mail SMTP’ is closed to new replies.