• Resolved Matt Pramschufer

    (@mattpramschufer)


    Hello,
    I am getting a fatal error when resending a failed email.

    [16-Jun-2025 12:10:30] WARNING: [pool www] child 27513 said into stderr: “NOTICE: PHP message: PHP Fatal error: Uncaught TypeError: preg_match(): Argument #2 ($subject) must be of type string, array given in /var/www/domain.com/wp-includes/PHPMailer/PHPMailer.php:1877”
    [16-Jun-2025 12:10:30] WARNING: [pool www] child 27513 said into stderr: “Stack trace:”
    [16-Jun-2025 12:10:30] WARNING: [pool www] child 27513 said into stderr: “#0 /var/www/domain.com/wp-includes/PHPMailer/PHPMailer.php(1877): preg_match(‘#^[a-z][a-z\d+….’, Array)”
    [16-Jun-2025 12:10:30] WARNING: [pool www] child 27513 said into stderr: “#1 /var/www/domain.com/wp-includes/PHPMailer/PHPMailer.php(1889): PHPMailer\PHPMailer\PHPMailer::isPermittedPath(Array)”
    [16-Jun-2025 12:10:30] WARNING: [pool www] child 27513 said into stderr: “#2 /var/www/domain.com/wp-includes/PHPMailer/PHPMailer.php(3267): PHPMailer\PHPMailer\PHPMailer::fileIsAccessible(Array)”
    [16-Jun-2025 12:10:30] WARNING: [pool www] child 27513 said into stderr: “#3 /var/www/domain.com/wp-content/plugins/fluent-smtp/app/Functions/helpers.php(579): PHPMailer\PHPMailer\PHPMailer->addAttachment(Array, ”)”
    [16-Jun-2025 12:10:30] WARNING: [pool www] child 27513 said into stderr: “#4 /var/www/domain.com/wp-content/plugins/fluent-smtp/fluent-smtp.php(49): fluentMailSend(Array, ‘Do Downtow…’, ‘First Name: Nic…’, Array, Array)”
    [16-Jun-2025 12:10:30] WARNING: [pool www] child 27513 said into stderr: “#5 /var/www/domain.com/wp-content/plugins/fluent-smtp/app/Models/Logger.php(384): wp_mail(Array, ‘Do Down…”

    https://pramadillo.s3.us-east-1.amazonaws.com/email-preview.png

    Thank you in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Ibrahim Sharif

    (@ibrahimsharif)

    Hello @mattpramschufer,

    Thanks for reaching out to us regarding the fatal error you’re encountering while resending failed emails. I’ve reviewed the error log you provided, and it appears the issue stems from the preg_match() function within the PHPMailer library receiving an array instead of a string for the subject when attempting to add an attachment.

    Based on the stack trace, it seems FluentSMTP is involved in this process. To help me further diagnose the problem, could you please confirm the PHP version your server is currently running?

    As a first step, I highly recommend trying PHP version 8.1. In many cases, updating to a more recent PHP version resolves compatibility issues and resolves type errors like this. You can usually update your PHP version through your hosting provider’s control panel (e.g., cPanel, Plesk) or by contacting their support team.

    After updating to PHP 8.1 (or confirming you are already using it), please try resending the failed email again and let me know if the issue persists. This will help narrow down the source of the problem.

    Looking forward to your update.

    Thread Starter Matt Pramschufer

    (@mattpramschufer)

    Hey @ibrahimsharif thanks for the quick reply. We are running PHP 8.3.21

    ### wp-server ###

    server_architecture: Linux 4.14.355-275.591.amzn2.x86_64 x86_64
    httpd_software: Apache
    php_version: 8.3.21 64bit
    php_sapi: fpm-fcgi
    max_input_variables: 1000
    time_limit: 120
    memory_limit: 512M
    admin_memory_limit: 1G
    max_input_time: 60
    upload_max_filesize: 1024M
    php_post_max_size: 1024M
    curl_version: 8.12.1 OpenSSL/3.3.3
    suhosin: false
    imagick_availability: true
    pretty_permalinks: true
    htaccess_extra_rules: true
    static_robotstxt_file: false
    current: 2025-06-18T13:26:47+00:00
    utc-time: Wednesday, 18-Jun-25 13:26:47 UTC
    server-time: 2025-06-18T09:26:47-04:00
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Fatal Error Resending Failed Email’ is closed to new replies.