• Resolved webdeveloper920

    (@webdeveloper920)


    Hello, after updating to the latest version of wordpress 5.5 i get an fatal error whenever i send an email from the website. This could be when a customer makes a booking or simply when doing the test-email from the wp mail smtp plugin page.

    Se the error message here

    Here is a picture of the functions line which the error references

    I have downgraded WordPress and now it works fine, so it has something to do with the new WordPress version.

    thanks

Viewing 15 replies - 1 through 15 (of 24 total)
  • Plugin Author Gregor Capuder

    (@capuderg)

    Hi @webdeveloper920,

    in WordPress version 5.5 there is a newer version of PHPMailer available (version 6). The code you are referencing here, is the argument $mailer with class PHPMailer expecting \PHPMailer (older WP core PHPMailer class used in 5.4.2 and lower)? Is this your custom code? If so, please try changing expected argument to be \PHPMailer\PHPMailer\PHPMailer (this is the PHPMailer class used in WP 5.5 and newer versions and what we are using to extend our MailCatcherV6 class from).

    So update to WP 5.5 and make that change to the code and it should work.

    Let me know how it goes.

    Have a nice weekend!

    Thread Starter webdeveloper920

    (@webdeveloper920)

    Hi sorry Gregor for my lack of knowledge, its custom code but not my custom code. What exactly do you want me to switch out and replace with?

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @webdeveloper920,

    no problem ??

    Replace PHPMailer $mailer part on first line with \PHPMailer\PHPMailer\PHPMailer $mailer.

    Let me know if that will resolve your issue.

    Take care!

    Thread Starter webdeveloper920

    (@webdeveloper920)

    That works! Thanks a lot, amazing support!

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @webdeveloper920,

    I’m glad you resolved your issue ??

    Have a nice day!

    Is a patch being worked on for this issue – It has occurred in multiple related plugins (no thanks to WP Code) – just want to know if there is a timeline for a fix.

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @kiwiot,

    there is nothing we can do to fix other plugins code. Other plugin authors or authors of custom code will have to update their code for compatibility with WordPress 5.5 (PHPMailer class changes).

    Take care!

    I totally get that – what I wanted to knopw is when is your plugin being patched?

    Yes, nevermind other plugins.
    We use WP Mail SMTP by WPForms and it’s only working and tested up to:5.4.2.

    Regards,
    Jorge

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @kiwiot and @anjoalre,

    I’m not sure what you mean… Our plugin is already compatible with WordPress 5.5, we just didn’t update the “Tested up to” on our plugin page yet (sorry about that).

    An update will be available soon and the above “tested up to” version will be updated to 5.5.

    Take care!

    Oh ok – sorry I am confused then as the plugin on WP says last updated a month ago and the above bug report timestamps because of WP 5.5 updates are in the last couple of days/week so I assumed that it was not yet updated.

    To be clear – your latest version 2.2.1 handles the path change of PHPMailer that is causing the bugs – I couldn’t find a changelog anywhere to confirm.

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @kiwiot,

    that’s correct, we already made the change for the WP 5.5 PHPMailer changes over a month ago (when WP 5.5. was in alpha and beta stages).

    The changelog for v2.2.1, second item: https://www.ads-software.com/plugins/wp-mail-smtp/#developers:

    > Added: Support both old PHPMailer v5 (WordPress <=5.4) and PHPMailer v6 (WordPress >=5.5).

    Have a nice day!

    Jeremy

    (@jeremybeckett)

    I’m glad this support thread is still open – I encountered a fatal error yesterday.

    Fatal error: Uncaught Error: Call to a member function is_mailer_complete() on null in /home/holobric/public_html/wp-content/plugins/wp-mail-smtp/src/Admin/Review.php:108 Stack trace: #0 /home/holobric/public_html/wp-content/plugins/wp-mail-smtp/src/Admin/Review.php(78): WPMailSMTP\Admin\Review->review() #1 /home/holobric/public_html/wp-includes/class-wp-hook.php(287): WPMailSMTP\Admin\Review->review_request(“) #2 /home/holobric/public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array) #3 /home/holobric/public_html/wp-includes/plugin.php(478): WP_Hook->do_action(Array) #4 /home/holobric/public_html/wp-admin/admin-header.php(284): do_action(‘admin_notices’) #5 /home/holobric/public_html/wp-admin/index.php(111): require_once(‘/home/holobric/…’) #6 {main} thrown in /home/holobric/public_html/wp-content/plugins/wp-mail-smtp/src/Admin/Review.php on line 108

    After a morning of debugging I got everything working again, with the exception of this plugin.

    If I understand the patch instructions I have to amend a line of code. My questions is “what file is this code in?”. I’ve looked in functions.php and it’s not there.

    Can you advise please?

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi Jeremy,

    This error that you are getting is not the same as others have posted above. Please open a new support thread in the future.

    This bug will be fixed in the next plugin release.

    But you can fix it by editing this file: wp-content/plugins/wp-mail-smtp/src/Admin/Review.php

    On line 92 you should change this line:

    if ( $mailer === 'mail' ) {

    to

    if ( empty( $mailer ) || $mailer === 'mail' ) {

    That should resolve your issue.

    Take care!

    Thank you for the fix @capuderg!

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘FATAL Error After updating to WP 5.5’ is closed to new replies.