When WordPress hands FluentSMTP a message with several To addresses (Gravity Forms notifications, WooCommerce order emails, woocommerce_email_recipient_* filters, etc.), the Email Log viewer prints a PHP serialized blob instead of the addresses:
a:7:{i:0;a:1:{s:5:"email";s:19:"ryan@example.com";}i:1;a:1:{s:5:"email";s:24:"mackenzie@example.com";}...
Sending itself succeeds. The log To column, and resend from that row, do not.
Root cause
FluentSMTP stores recipients as a PHP-serialized array of {email, name} rows in fsmpt_email_logs.to, which is VARCHAR(255).
A serialized list of four typical addresses still fits. Five or more is clipped by MySQL. WordPress is_serialized() then rejects the truncated string (it no longer ends in }), so the admin UI renders the raw blob. Resend foreaches that string instead of an address list.
This is the same failure as #366 and #132; those reports described it as JSON / a WooCommerce-only break. It is the column width, and it shows up for any plugin that puts several addresses in wp_mail()'s $to argument. Gravity Forms notifications with a comma-separated Send To list are one example.
Steps to reproduce
- Enable email logging.
- Send a message to 5+ addresses in a single
wp_mail() To (a Gravity Forms notification with several Send To emails is enough).
- Open Email Logs and view the row.
Expected: a@example.com, b@example.com, ...
Actual: a truncated a:7:{i:0;a:1:{s:5:"email";... string.
A send to four of the same addresses still displays correctly, which is why this looks intermittent.
Related
When WordPress hands FluentSMTP a message with several To addresses (Gravity Forms notifications, WooCommerce order emails,
woocommerce_email_recipient_*filters, etc.), the Email Log viewer prints a PHP serialized blob instead of the addresses:Sending itself succeeds. The log To column, and resend from that row, do not.
Root cause
FluentSMTP stores recipients as a PHP-serialized array of
{email, name}rows infsmpt_email_logs.to, which isVARCHAR(255).A serialized list of four typical addresses still fits. Five or more is clipped by MySQL. WordPress
is_serialized()then rejects the truncated string (it no longer ends in}), so the admin UI renders the raw blob. Resendforeaches that string instead of an address list.This is the same failure as #366 and #132; those reports described it as JSON / a WooCommerce-only break. It is the column width, and it shows up for any plugin that puts several addresses in
wp_mail()'s$toargument. Gravity Forms notifications with a comma-separated Send To list are one example.Steps to reproduce
wp_mail()To (a Gravity Forms notification with several Send To emails is enough).Expected:
a@example.com, b@example.com, ...Actual: a truncated
a:7:{i:0;a:1:{s:5:"email";...string.A send to four of the same addresses still displays correctly, which is why this looks intermittent.
Related