• Resolved vincentdonker

    (@vincentdonker)


    Dear sir/madam,

    Since the last update, I get critical errors when trying to send e-mails via WP Mail SMTP.

    I use the most recent version of WordPress and WooCommerce. PHP Version 7.4. WP Mail SMTP is configured with Sendinblue.

    I tried the Action Scheduler plugin and WP-DBManager as suggested in https://www.ads-software.com/support/topic/there-has-been-a-critical-error-on-your-website-65/, this didn’t work.

    I set up WordPress Error Logs in WP-Config as per https://www.wpbeginner.com/wp-tutorials/how-to-set-up-wordpress-error-logs-in-wp-config/. However, no debug.log file appears in my wp-content folder.

    The following error displays when I am trying to send a test e-mail using WP Mail SMTP:

    Deprecated: class-phpmailer.php has been deprecated since version 5.5.0. Instead, use wp-includes / PHPMailer / PHPMailer.php. The PHPMailer class has been moved to wp-includes / PHPMailer subdirectory and now uses the PHPMailer \ PHPMailer namespace. in /mysite.com/public_html/wp-includes/functions.php on line 4963
    
    Deprecated: class-smtp.php has been deprecated since version 5.5.0. Instead, use wp-includes / PHPMailer / SMTP.php. The SMTP class has been moved to the wp-includes / PHPMailer subdirectory and now uses the PHPMailer \ PHPMailer namespace. in /mysite.com/public_html/wp-includes/functions.php on line 4963
    
    Fatal error: Cannot declare class PHPMailer \ PHPMailer \ SMTP, because the name is already in use in /mysite.com/public_html/wp-includes/PHPMailer/SMTP.php on line 30

    I don’t have enough knowledge of PHP, how can I resolve these errors?

    Thank you in advance for your help!

    Vincent

Viewing 15 replies - 1 through 15 (of 27 total)
  • Hi @vincentdonker,

    We had a similar problem. Did you try the solution posted here?

    FYI, we are not using the Action Scheduler nor WP-DBManager plugins. Everything is working without them.

    Cheers!

    Hi @vincentdonker,

    Thanks for reaching out. The error indicates that your theme or any of your plugins is not compatible with WordPress 5.5. You’ll need to find out the incompatible theme or plugin. Please make sure all of the plugins and your theme is updated, possibly they already have a fix. If that didn’t solve the issue, follow this troubleshooting guide.

    Please note that the error isn’t related with database tables, Action Scheduler, and the procedures in the thread link you’ve posted.

    I hope this helps!

    Thread Starter vincentdonker

    (@vincentdonker)

    Hello @sanzeeb3

    Thanks for the quick reply. All themes and plugins are updated (I set auto-updates).

    Additionally the notice below is displayed:
    Trying to access array offset on value of type null in mysite.com/public_html/wp-content/plugins/woocommerce-sendinblue-newsletter-subscription/woocommerce-sendinblue.php on line 412

    @jetxpert Thanks I will try your suggestion.

    • This reply was modified 4 years, 6 months ago by vincentdonker.

    I’m getting the exact same error message as originally posted, (except I’m using SendGrid instead of Sendinblue). When I deactivate your plugin, my site is again able to send emails correctly without this error message.

    @joshmyself,

    Did you the solution posted here? You may have a plugin conflict and/or need to clean up your /wp-admin/options.php entries.

    The solution provided will allow you to re-activate or reinstall the conflicting plugin, if any.

    Cheers!

    Hi @jetxpert,

    I followed these steps as suggested, (although am using WooCommerce, so didn’t touch that):

    1. Deactivated and deleted current version of WP Mail SMTP (V2.3.1). Prior to deactivation, followed instructions to set option to uninstall plugin upon its removal.
    2. Open /wp-admin/options.php page on site.
    3. On that page find options with these names: schema-ActionScheduler_LoggerSchema, schema-ActionScheduler_StoreSchema, and action_scheduler_migration_status (if any, the last one may be missing)
    4. Remove their values (leave them empty), save the changes.
    5. Manually downloaded older version (WP MAIL SMTP V2.1.1.) Then installed and activated it.
    6. Updated it to latest version (V2.3.1)
    7. Test send email… Failed with same critical error.
    8. Deactivate WP MAIL SMTP
    9. Test send email… Success
    10. Now looking for new SMTP mail plugin suggestions…?

    Hi @vincentdonker, @joshmyself

    If you’re getting a fatal error when sending an email (original question) which is:

    Fatal error: Cannot declare class PHPMailer \ PHPMailer \ SMTP, because the name is already in use

    Please note that this isn’t an issue with Action Scheduler and you should not do the steps above.

    The issue is any of your plugins or your theme is not compatible with WordPress 5.5. Please update all the plugins and your theme. If that didn’t help, follow this troubleshooting guide to find out the incompatible plugin/theme.

    I hope this helps!

    @sanzeeb3,

    Agree, it’s imperative to check for a plugin conflict. Once the offending plugin(s) is identified, then the solution provided above will work.

    @joshmyself,

    The steps you provided above did not mention if you performed a plugin conflict check as suggested in the recommended solution. For example, is your Woo-commerce plugin up-to-date? Did you deactivate it to see if it’s the root cause of your issue? Did you clean your wp_options DB table? In short, it doesn’t look like you performed Steps (1), (3), and (4) of the suggested solution. Can you try that again?

    Cheers!

    Thread Starter vincentdonker

    (@vincentdonker)

    @sanzeeb3 Thanks voor the reply.

    Updating All Plugins/themes did not resolve the issue. Testing by turning off/on plugins one-by-one partially resolves the issue. I also tried uninstalling (including deleting settings) the WP-Mail SMTP plugin.

    When disabling the WP-Mail-SMTP plugin, some Woocommerce transactional e-mails work again (order sent), though other transactional e-mail still don’t work (new order/processing order).

    The e-mails that are sent to my admin e-mail from the contact form (WPForms) on my site does work.

    The newsletter subscription confirmation mail does not work.

    When doing an e-mail test in the WP-Mail-SMTP plugin I still get the critical error. On another WordPress site that is using the same plugins, I do not get the critical error.

    I am not sure how to further troubleshoot.

    @sanzeeb3 and @jetxpert thanks, I should have clarified those details for you, I’m running WordPress 5.5.1, on PHP 7.4, and using default theme TwentyTwenty, with all plugins deactivated except for WP Mail SMTP 2.3.1, and I still get that critical error when sending a test email.

    I just realised I should probably post my questions in its own thread, sorry @vincentdonker I didn’t mean to hijack your thread!

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @vincentdonker,

    it looks like the WooCommerce – Sendinblue Add-on is causing the issue. They are requiring the old class-phpmailer.php and class-smtp.php files and that is causing the issue.

    Their plugin is not compatible with WP 5.5, so it would be best if you contacted their support for help. They should update their plugin with WP 5.5 PHPMailer changes…

    Please try to deactivate that plugin and test out if our plugin started working again. It could be that another plugin is causing the same issue as well.

    Take care!

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @joshmyself,

    you are getting this PHP error?

    Fatal error: Cannot declare class PHPMailer \ PHPMailer \ SMTP, because the name is already in use in /mysite.com/public_html/wp-includes/PHPMailer/SMTP.php on line 30

    With no other plugins active on a default (no modifications) Twenty Twenty theme?

    Where are you hosting your site?

    Could you please also check the wp-config.php file on your server? is there any mention of smpt or phpmailer in it? I’ve seen some hosting companies modify the PHPMailer functionality in that file before.

    Take care!

    Thread Starter vincentdonker

    (@vincentdonker)

    @capuderg Thanks you for the suggestion.

    I deactivated the Sendinblue plugin and tried to send a test e-mail via WP-Mail-SMTP, I still got the critical error.

    As I said, I have other WordPress sites with the same WordPress version, Theme and plugins and on those sites everything works fine. The only difference with the site that has issues is that the Woocommerce plugin is installed.

    I will try to deactivate plugins one by one to see if one is incompatible with WP-Mail-SMTP.

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @vincentdonker,

    could you please try to deactivate all plugins, except for the WP Mail SMTP, then try to send an email and see if it still fails?

    If it doesn’t you can enabled the plugins back one by one and see which ones cause the issue.

    Take care!

    Thread Starter vincentdonker

    (@vincentdonker)

    Maybe it is good to mention: I only get the critical error message when trying to send a test e-mail via the WP-Mail-SMTP plugin. I can then just navigate to the previous page in my browser and have acces to WP-Admin.

    @capuderg I tried deactivating all plugins except for WPForms and WP-Mail-SMTP and I still could not sends a test e-mail via the plugin settings. Still getting the Critical Error message.

    It says to check the admin e-mail for instructions, but no mail is sent to the admin e-mail.

Viewing 15 replies - 1 through 15 (of 27 total)
  • The topic ‘Critical Error’ is closed to new replies.