[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 19:15:56 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 I feel we are reinventing the wheel here with this closure
You are adapting the array(name,address) format into the "name <address>"
format, so after, [https://github.com/SirLouen/wordpress-
develop/blob/413b7ea23c6bca900ea4b9523ba98c5e4faa1169/src/wp-
includes/pluggable.php#L462 match it back to that format]
I think its a great opportunity to do a massive revamp here
([https://github.com/SirLouen/wordpress-
develop/blob/413b7ea23c6bca900ea4b9523ba98c5e4faa1169/src/wp-
includes/pluggable.php#L241 including $to])
So by the time [https://github.com/SirLouen/wordpress-
develop/blob/413b7ea23c6bca900ea4b9523ba98c5e4faa1169/src/wp-
includes/pluggable.php#L462-L468 all addresses reach this section] we
already have them sorted out.
There are no filters in between, so there won't be any compat issues.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62940#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list