• Resolved ink

    (@artcontraire)


    Upon installing the Post SMTP Mailer plugin I received the message “wp_mail has been declared by another plugin or theme”. The conflict occurs when used with the widely popular MalCare plugin together. I have contacted the MalCare support and they looked into the issue and came to this conclusion:

    The function wp_mail is present in the wp-includes/pluggable.php file. This file loads once all the plugins are loaded in normal flow. But it has some functionalities our plugin requires while loading. Hence we have loaded this file.

    So now the issue here is that the following file of the SMTP-Post plugin:
    post-smtp/Postman/PostmanWpMailBinder.php has a function bind which simply checks if the wp_mail function exists and, based on it, concludes that wp_mail has been binded by another plugin or theme.

    It is very common to load this pluggable file, as it has many useful functionalities.

    Is there any way to fix this plugin conflict or does the Post SMTP Mailer plugin really not use in conjunction with any plugin that loads the wp-includes/pluggable.php file?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter ink

    (@artcontraire)

    More detailed feedback from the MalCare plugin which told me to contact your support instead:

    WordPress will load this file once all the plugins are loaded.
    But this file has various functionalities other than wp_mail, which are of use to many plugins, so it is common to load this file earlier so that those functionalities can be used.
    ?
    Please get in touch with the “Post SMTP Mailer/Email Log” plugin’s developer with the above issue.

    Any idea how to solve this issue that causes the Post SMTP Mailer plugin not to work with the MalCare plugin together?

    • This reply was modified 2 years, 9 months ago by ink.
    Plugin Support M Haseeb

    (@haseeb0001)

    @artcontraire Hi,

    Hope you are doing good.

    Let me reproduce this issue on my staging websites, will get back to you soon with updates.

    Thanks

    Plugin Support M Haseeb

    (@haseeb0001)

    @artcontraire Hi,

    Functions present in wp-includes/pluggable.php are Pluggable and can be overridden, Post SMTP is doing it to implement SMTPs.

    If this file wp-includes/pluggable.php contains the wp_mail function, Post SMTP is overriding it, Loading file wp-includes/pluggable.php or wp_mail before Post SMTP declares wp_mail won’t let Post SMTP work.

    Thanks

    I see the same error in my PHP error log too after I did the plugin update today. [15-Jul-2022 08:09:23 UTC] FATAL Postman: Postman: wp_mail has been declared by another plugin or theme, so you won’t be able to use Postman until the conflict is resolved.

    I tried to change the mailer type as shown in this photo https://enduringnet.org/wp-content/plugins/post-smtp/assets/images/gif/mailer-type.gif. But the test email couldn’t be sent. The original post SMTP mailer type works fine for now, so I will keep observing.
    This photo is shown on some of my sites with the same error message after updating the plugin.

    And kindly let me know too if your team fix it.

    • This reply was modified 2 years, 8 months ago by ruen06.
    Plugin Support M Haseeb

    (@haseeb0001)

    @ruen06 @artcontraire

    We are looking into this issue and will get back to you with updates soon.

    Thanks

    Plugin Support M Haseeb

    (@haseeb0001)

    @ruen06 @artcontraire Plesae share the Diagnostic test report.

    Thanks

    Hi, how to get the report?

    Plugin Support M Haseeb

    (@haseeb0001)

    For Diagnostic Report please see the screenshot here.

    Plugin Support M Haseeb

    (@haseeb0001)

    Plugin Support M Haseeb

    (@haseeb0001)

    We haven’t heard from you so we’re going to mark this thread as resolved. Feel free to open a new one if you need it.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Major plugins conflict – wp_mail has been declared by another plugin or theme’ is closed to new replies.