• Resolved Oded Talmon

    (@odedta)


    Hello,
    I am getting this error when I try to resend a failed email:

    [01-Sep-2024 09:11:13 UTC] PHP Fatal error:  Uncaught TypeError: preg_match(): Argument #2 ($subject) must be of type string, array given in /home/taliorgi/public_html/websites/tali.org.il/wp-includes/PHPMailer/PHPMailer.php:1880
    Stack trace:
    #0 /home/taliorgi/public_html/websites/tali.org.il/wp-includes/PHPMailer/PHPMailer.php(1880): preg_match()
    #1 /home/taliorgi/public_html/websites/tali.org.il/wp-includes/PHPMailer/PHPMailer.php(1892): PHPMailer\PHPMailer\PHPMailer::isPermittedPath()
    #2 /home/taliorgi/public_html/websites/tali.org.il/wp-includes/PHPMailer/PHPMailer.php(3271): PHPMailer\PHPMailer\PHPMailer::fileIsAccessible()
    #3 /home/taliorgi/public_html/websites/tali.org.il/wp-content/plugins/fluent-smtp/app/Functions/helpers.php(543): PHPMailer\PHPMailer\PHPMailer->addAttachment()
    #4 /home/taliorgi/public_html/websites/tali.org.il/wp-content/plugins/fluent-smtp/fluent-smtp.php(42): fluentMailSend()
    #5 /home/taliorgi/public_html/websites/tali.org.il/wp-content/plugins/fluent-smtp/app/Models/Logger.php(346): wp_mail()
    #6 /home/taliorgi/public_html/websites/tali.org.il/wp-content/plugins/fluent-smtp/app/Http/Controllers/LoggerController.php(66): FluentMail\App\Models\Logger->resendEmailFromLog()
    #7 [internal function]: FluentMail\App\Http\Controllers\LoggerController->retry()
    #8 /home/taliorgi/public_html/websites/tali.org.il/wp-content/plugins/fluent-smtp/includes/Core/Container.php(507): call_user_func_array()
    #9 /home/taliorgi/public_html/websites/tali.org.il/wp-content/plugins/fluent-smtp/includes/Core/Container.php(633): FluentMail\Includes\Core\Container->call()
    #10 /home/taliorgi/public_html/websites/tali.org.il/wp-content/plugins/fluent-smtp/includes/Core/Container.php(502): FluentMail\Includes\Core\Container->callClass()
    #11 /home/taliorgi/public_html/websites/tali.org.il/wp-content/plugins/fluent-smtp/includes/Core/CoreTrait.php(73): FluentMail\Includes\Core\Container->call()
    #12 /home/taliorgi/public_html/websites/tali.org.il/wp-content/plugins/fluent-smtp/includes/Core/CoreTrait.php(31): FluentMail\Includes\Core\Application->FluentMail\Includes\Core\{closure}()
    #13 /home/taliorgi/public_html/websites/tali.org.il/wp-includes/class-wp-hook.php(324): FluentMail\Includes\Core\Application->FluentMail\Includes\Core\{closure}()
    #14 /home/taliorgi/public_html/websites/tali.org.il/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #15 /home/taliorgi/public_html/websites/tali.org.il/wp-includes/plugin.php(517): WP_Hook->do_action()
    #16 /home/taliorgi/public_html/websites/tali.org.il/wp-admin/admin-ajax.php(192): do_action()
    #17 {main}
    thrown in /home/taliorgi/public_html/websites/tali.org.il/wp-includes/PHPMailer/PHPMailer.php on line 1880

    I am changed to default theme and there are no other plugins that uses SMTP. What should I do?
    PHP 8.1, Updated wordpress and plugins. Sending a test email works.

    Thanks!

    • This topic was modified 1 month, 3 weeks ago by Oded Talmon.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Oded Talmon

    (@odedta)

    I have just realized that only 2 emails were causing this issue, emails with a CSV attachment, hope that helps.

    Plugin Support Ibrahim Sharif

    (@ibrahimsharif)

    Hello @odedta,

    I understand that you’re getting a PHP Fatal error when trying to resend a failed email. The error message mentions preg_match(), which suggests an issue with a regular expression.

    Could you please let me know which email provider you are using? Additionally, it would be helpful to know the origin of the email, such as whether it was generated by WooCommerce or another plugin.

    Once I have this information, I can provide you with more specific troubleshooting steps.

    Thanks for your patience and cooperation.

    Thread Starter Oded Talmon

    (@odedta)

    Hey,
    I was basically using wp_mail() function in order to send and email with CSV attachments, the email arrives to its destination with the attachment just fine. The SMTP plugin is connecting to a gmail inbox. When an email with a CSV attachment is being resent you get this error.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.