[wp-trac] [WordPress Trac] #62940: wp_mail(): Address header parsing is not RFC-5322 complient and fails on quoted-string when including a "<", ">" or ", "
WordPress Trac
noreply at wordpress.org
Tue Sep 2 18:36:18 UTC 2025
#62940: wp_mail(): Address header parsing is not RFC-5322 complient and fails on
quoted-string when including a "<", ">" or ","
-------------------------------------------------+-------------------------
Reporter: bhujagendra | Owner: jdeep
Type: enhancement | Status: assigned
Priority: normal | Milestone: Future
| Release
Component: Mail | Version: 2.1.1
Severity: normal | Resolution:
Keywords: needs-unit-tests has-test-info has- | Focuses:
patch |
-------------------------------------------------+-------------------------
Comment (by SirLouen):
@jdeep additional info
It seems that all tests are simply running in the docker image that we use
for `wordpress-develop`. So basically `imap` is not there, by default,
hence in the CI it won't be running. Any skipped test is running
currently. They are planning to introduce an upgraded version for testing
with multiple environments including different extensions, but we don't
know when this might come.
For this reason, and for now, we need to versions: One version checking
for the IMAP extension and `markTestSkipped` if it doesn't exist.
[https://github.com/WordPress/wordpress-
develop/blob/413b7ea23c6bca900ea4b9523ba98c5e4faa1169/tests/phpunit/includes
/testcase-xml.php#L43-L45 Like this]
This version can include complex scenarios, like the ones proposed by the
OP, with commas and square brackets.
And the other, running very basic tests with very simple addresses (can be
multiple addresses, but very simple, like "Name <email(at)example.com>",
or just the email).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62940#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list