• Resolved anifantic

    (@anifantic)


    Hi,
    After updating the plugin, the following error is received. Any idea what this might be caused by?

    When seeking help with this issue, you may be asked for some of the following information:
    WordPress version 5.5
    Current plugin: WP Mail SMTP (version 2.2.1)
    PHP version 7.3.16

    Error Details
    =============
    An error of type E_ERROR was caused in line 79 of the file /home/sunpent/public_html/wp-content/plugins/wp-mail-smtp/src/Providers/MailerAbstract.php. Error message: Uncaught TypeError: Argument 1 passed to WPMailSMTP\Providers\MailerAbstract::__construct() must implement interface WPMailSMTP\MailCatcherInterface, instance of PHPMailer\PHPMailer\PHPMailer given, called in /home/sunpent/public_html/wp-content/plugins/wp-mail-smtp/src/Providers/Loader.php on line 190 and defined in /home/sunpent/public_html/wp-content/plugins/wp-mail-smtp/src/Providers/MailerAbstract.php:79
    Stack trace:
    #0 /home/sunpent/public_html/wp-content/plugins/wp-mail-smtp/src/Providers/Loader.php(190): WPMailSMTP\Providers\MailerAbstract->__construct(Object(PHPMailer\PHPMailer\PHPMailer))
    #1 /home/sunpent/public_html/wp-content/plugins/wp-mail-smtp/src/Providers/Loader.php(146): WPMailSMTP\Providers\Loader->get_entity(‘smtp’, ‘Mailer’)
    #2 /home/sunpent/public_html/wp-content/plugins/wpforms-lite/src/Admin/Pages/SMTP.php(451): WPMailSMTP\Providers\Loader->get_mailer(‘smtp’, Object(PHPMailer\PHPMailer\PHPMailer))
    #3 /home/sunpent/public_html/wp-content/plugins/wpforms-lite/src/Admin/Pages/SMTP.php(476

    Thank you.

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

    (@capuderg)

    Hi @anifantic,

    thank you for the details.

    When does this error occur? Did it occur just one time, during the plugin update? Is it still occurring for you? Are there any steps that you make in order for this error to trigger?

    I’ve just tried to replicate this error on my testing site (with WPForms and WP Mail SMTP) and did not get any PHP errors in the error log. Is your WPForms plugin also on the latest version?

    Take care!

    Hi @anifantic – We haven’t heard from you in about a week, so I’m going to go ahead and mark this ticket resolved. If you still have questions, though, please feel welcome to continue the conversation.

    Thread Starter anifantic

    (@anifantic)

    Hi,
    Sorry for my late reply. I disabled WP forms plugin and waited to see if there is any more error occurs. And received the error message below started this morning from WP MAIL SMTP. Test email were send successfully and setting didn’t change since first day that we are using this plugin which was one year ago. Please advise.

    EMAIL DELIVERY ERROR: the plugin WP Mail SMTP v2.2.1 logged this error during the last time it tried to send an email:

    Mailer: Other SMTP
    SMTP Error: Could not authenticate.

    Please review your WP Mail SMTP settings in plugin admin area. Consider running an email test after fixing it.

    Thank you.

    Hi @anifantic,

    When you get a chance, could you please let me know if you’re using constants in wp-config.php to secure your SMTP settings? If so, please make sure to add constants above the line that reads /* That’s all, stop editing! Happy publishing. */.

    Thanks!

    Thread Starter anifantic

    (@anifantic)

    Hi Sanjeev,
    Thank you for your reply. I’m using the password constant in wp-config.php. And just moved the constant above the line that reads /* That’s all, stop editing! Happy publishing. */.
    Will let you know if I keep receiving the error.

    Thank you.

    Thread Starter anifantic

    (@anifantic)

    Hi Sanjeev,
    I’ve received the same error again today after changing the setting in wp-config.php you suggested. I’m thinking to remove the password constant from wp-config.php to see if the error persists. What’s the most proper way to remove the password constant from wp-config.php?

    Thank you.

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @anifantic,

    if the password is the only plugin constant, you can remove all WP Mail SMTP plugin constants from the wp-config.php file. If you have other constants, then just remove the password constant. Then go to the plugin settings and input the password and save the plugin settings.

    Take care!

    Im having the also this error, suddenly this didn’t work anymore.

    Fatal error: Uncaught TypeError: Argument 1 passed to timetable_phpmailer_init() must be an instance of PHPMailer, instance of WPMailSMTP\MailCatcherV6 given, called in

    Hi @memt-network,

    It looks like your plugins or theme is not compatible with WordPress 5.5. Please make sure all of your plugins are up to date. Could you please share the list of your activated plugins?

    Thanks!

    Sanjeev, I have the same error and unable to approve a user:

    Argument 1 passed to timetable_phpmailer_init() must be an instance of PHPMailer, instance of WPMailSMTP\MailCatcherV6 given, called in /var/www/html/wp-includes/class-wp-hook.php

    All my plugins are up to date including WordPress itself and the themes.
    I tried to deactivate some plug-ins but no luck – email fails.
    Thank you in advance for looking at it.

    Here is the list of active plugins:
    Advanced Editor Tools (previously TinyMCE Advanced)
    Breadcrumb NavXT
    Category Order and Taxonomy Terms Order
    Change Memory Limit
    Contact Form 7
    Envato Market
    GDPR Compliance & Cookie Consent
    Google Analytics for WordPress by MonsterInsights
    HubSpot All-In-One Marketing – Forms, Popups, Live Chat
    MC4WP: Mailchimp for WordPress
    Menu Image
    New User Approve
    NextGEN Gallery
    Profile Builder
    Redirection
    Restrict Content
    Slider Revolution
    Smash Balloon Instagram Feed
    Social Media and Share Icons (Ultimate Social Media)
    SSL Insecure Content Fixer
    STM Importer
    STM Post Type
    Timetable Responsive Schedule For WordPress
    UpdraftPlus – Backup/Restore
    WooCommerce
    Wordfence Security
    WP Mail SMTP
    Yoast Duplicate Post
    Yoast SEO

    Hi @boris101g,

    Thanks for providing the list. It looks like the error is due to the “Timetable Responsive Schedule For WordPress” plugin which isn’t compatible with changes in WordPress 5.5. Please see if there’s an update available for that plugin, if not deactivate that plugin and/or contact their support to fix the issue.

    I hope this helps!

    Thanks a lot Sanjeev! I updated the Timetable Responsive Schedule and all its components and everything works well now!
    Thank you so much once again!

    Dear all,

    I have updated php and gotten the same error:

    Fatal error: Uncaught Error: Argument 1 passed to wpse8170_phpmailer_init() must be an instance of PHPMailer, instance of WPMailSMTP\MailCatcherV6 given, called in /home1/buaancan/public_html/wp-includes/class-wp-hook.php on line 287
    in /home1/buaancan/public_html/wp-content/themes/vsante_2017/functions.php on line 864
    
    Call stack:
    
    wpse8170_phpmailer_init()
    wp-includes/class-wp-hook.php:287
    WP_Hook::apply_filters()
    wp-includes/class-wp-hook.php:311
    WP_Hook::do_action()
    wp-includes/plugin.php:551
    do_action_ref_array()
    wp-includes/pluggable.php:494
    wp_mail()
    wp-content/plugins/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:198
    WPMailSMTP\A\P\TestTab::process_post()
    wp-content/plugins/wp-mail-smtp-pro/src/Admin/Area.php:866
    WPMailSMTP\A\Area::process_actions()
    wp-includes/class-wp-hook.php:287
    WP_Hook::apply_filters()
    wp-includes/class-wp-hook.php:311
    WP_Hook::do_action()
    wp-includes/plugin.php:484
    do_action()
    wp-admin/admin.php:175

    The email set up is ok but I get error when clicking sending test email.

    Here is the list of plugins activated on my website:
    Advanced Custom Fields PRO
    Autoptimize
    Captcha
    CF7 Google Sheet Connector
    Contact Form 7
    Far Future Expiration Plugin
    MC4WP: Mailchimp for WordPress
    Query Monitor
    Really Simple SSL
    Remove Query Strings From Static Resources
    Smush Pro
    SSL Insecure Content Fixer
    UpdraftPlus – Backup/Restore
    WooCommerce
    WP Mail SMTP Pro
    WP-Optimize – Clean, Compress, Cache
    WPForms

    Could anyone have an idea where the error comes form?

    Thanks!

    Hi @pippin09,

    The error is coming from your theme which is not compatible with WordPress 5.5 and higher. Please contact your theme developer to fix the issue. Theme’s functions.php line 864 is the source of the issue.

    Thanks!

    Thanh you very much @sanzeeb3 .

    We have checked and the plugin works now.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Fatal Error Caused by WP Mail SMTP’ is closed to new replies.