Skip to content

Supported comma-separated recipients addresses - #3139

Merged
pirate-bot merged 2 commits into
developmentfrom
bugfix/3137
Oct 27, 2026
Merged

pirate-bot merged 2 commits into
developmentfrom
bugfix/3137

Conversation

@girishpanchal30

Copy link
Copy Markdown
Contributor

Closes #3137

Summary

Updated the Form notification Email To field to support comma-separated email addresses, sanitizing each entry, excluding invalid addresses, and sending notifications to all valid recipients with a fallback to the site admin if none remain. Updated test emails to use the same recipient list, with the first address as the sender, and modified the otter/update-form Abilities API to accept comma-separated email_to values while rejecting lists containing invalid addresses.


Checklist before the final review

  • Included E2E or unit tests for the changes in this PR.
  • Visual elements are not affected by independent changes.
  • It is at least compatible with the minimum WordPress version.
  • It loads additional script in frontend only if it is required.
  • Does not impact the Core Web Vitals.
  • In case of deprecation, old blocks are safely migrated.
  • It is usable in Widgets and FSE.
  • Copy/Paste is working if the attributes are modified.
  • PR is following the best practices

@pirate-bot

Copy link
Copy Markdown
Contributor

Bundle Size Diff

Package Old Size New Size Diff
Animations 178.33 KB 178.33 KB 0 B (0.00%)
Blocks 1.65 MB 1.65 MB -1 B (-0.00%)
CSS 7.83 KB 7.83 KB 0 B (0.00%)
Dashboard 172.49 KB 172.49 KB 0 B (0.00%)
Onboarding 68.14 KB 68.14 KB 0 B (0.00%)
Export Import 4.73 KB 4.73 KB 0 B (0.00%)
Pro 439.85 KB 439.85 KB 0 B (0.00%)

@pirate-bot

pirate-bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Plugin build for 8b3e291 is ready 🛎️!

@pirate-bot

pirate-bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

E2E Tests

Playwright Test Status: See serial and parallel matrix jobs

Performance Results serverResponse: {"q25":471.86,"q50":492.3,"q75":521.08,"cnt":10}, firstPaint: {"q25":1541.67,"q50":1645.7,"q75":1866.84,"cnt":10}, domContentLoaded: {"q25":4410.64,"q50":4418.75,"q75":4444.85,"cnt":10}, loaded: {"q25":4414.17,"q50":4422.23,"q75":4448.58,"cnt":10}, firstContentfulPaint: {"q25":2871.96,"q50":3277.54,"q75":3322.18,"cnt":10}, firstBlock: {"q25":20224.11,"q50":20242.17,"q75":20348.11,"cnt":10}, type: {"q25":30.07,"q50":32.81,"q75":35.59,"cnt":10}, typeWithoutInspector: {"q25":29.76,"q50":32.56,"q75":35.99,"cnt":10}, typeWithTopToolbar: {"q25":41.34,"q50":52.19,"q75":62.08,"cnt":10}, typeContainer: {"q25":18.97,"q50":19.56,"q75":19.93,"cnt":10}, focus: {"q25":160.66,"q50":167.67,"q75":174.26,"cnt":10}, inserterOpen: {"q25":49.49,"q50":51.32,"q75":58.49,"cnt":10}, inserterSearch: {"q25":34.09,"q50":35.29,"q75":36.97,"cnt":10}, inserterHover: {"q25":5.11,"q50":5.52,"q75":5.84,"cnt":20}, loadPatterns: {"q25":2163.51,"q50":2188.88,"q75":2202.23,"cnt":10}, listViewOpen: {"q25":286.38,"q50":290.72,"q75":307.28,"cnt":10}

@pirate-bot pirate-bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes requested

The comma-separated recipient support works, but add a test for the new test-email fallback when every address is invalid.

Validation details
  • Files reviewed: 5/5 changed files.
  • PHPUnit 9.6.5 on PHP 8.3.35 passed the new tests at HEAD cd /repo; set -o pipefail; timeout 280 vendor/bin/phpunit --do-not-cache-result --filter 'Test_Abilities::' 2>&1 | tee /… (run R3, exit 0) cd /repo; set -o pipefail; timeout 280 vendor/bin/phpunit --do-not-cache-result --filter 'Test_Form_Server::test_(fronte… (run R4, exit 0).
  • On the base tree, 5 of the 7 new cases failed on the changed assertion. That run has no run record.
  • The editor value reaches the stored option with commas intact. sanitize_text_field keeps them.
  • Every To and From address passes sanitize_email and is_email. The route permissions did not change.
Untested areas
  • The Email To field was not checked in a browser. The sandbox has no built assets.
  • Real delivery to several recipients was not run. The tests mock wp_mail.

🤖 Automated review · run code-review-agent_6ae08e5d7bcae6.75671950.


🤖 Review agent — review posted ✅ on d8999e4f · changes requested · 1 finding · 10 min

Run code-review-agent_6ae08e5d7bcae6.75671950 · trail

Comment thread tests/test-form-server.php

@pirate-bot pirate-bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approved

The PR passes. The new test covers the all-invalid test-email fallback that the earlier review asked for.

Validation details
  • Files reviewed: 5/5 changed files. Only tests/test-form-server.php changed since the earlier review.
  • PHPUnit 9.6 on PHP 8.3.35 passed the new test at HEAD: cd /workspace; set -o pipefail; sandbox-wp-tests.sh 2>&1 | tail -5; echo "exit ${PIPESTATUS[0]}"; cd /repo && set -o pip… printed OK (1 test, 3 assertions) (run R1).
  • The new test is the only one that sends a non-empty to with only invalid entries.
  • Earlier results from run code-review-agent_6ae08e5d7bcae6.75671950 at d8999e4 still apply, not rerun. The non-test code did not change since then.
Untested areas
  • The Email To field was not checked in a browser. The sandbox has no built assets.
  • Real delivery to several recipients was not run. The tests mock wp_mail.

🤖 Automated review · run code-review-agent_6ae091a12c3169.46331047.


🤖 Review agent — review posted ✅ on 8b3e2917 · approved · 0 findings · 4 min

Run code-review-agent_6ae091a12c3169.46331047 · trail

@pirate-bot
pirate-bot merged commit c8a1fba into development Oct 27, 2026
15 checks passed
@pirate-bot
pirate-bot deleted the bugfix/3137 branch October 27, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants