[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 07:34:29 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 jdeep):
Replying to [comment:9 SirLouen]:
> @jdeep
>
> So lets take one thing at a time. Maybe we can open a second ticket in
the future to handle the multiple From part. For now lets try to fix the
first as I commented in the beginning (with the `parseAddresses` support
in exchange on the weak logic for parsing headers in the current code)
>
> We also need unit tests for this.
>
For the unit tests, how should we approach them? Since `parseAddresses()`
relies on the IMAP extension, should the tests be written to verify
headers against fully RFC-5322-compliant cases only when the IMAP
extension is available?
Also, how would this behave in the CI pipelines—would we need to ensure
the IMAP extension is installed there?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62940#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list