[wp-trac] [WordPress Trac] #21659: wp_mail() problem with Reply-To header
WordPress Trac
noreply at wordpress.org
Fri Jul 1 14:50:40 UTC 2016
#21659: wp_mail() problem with Reply-To header
--------------------------------------+-----------------------------
Reporter: pavelevap | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Mail | Version: 3.4.1
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+-----------------------------
Comment (by iandunn):
Ah, you're right, that is much more readable. `21659.4.diff` implements
that.
I didn't see a good way to keep the cases in `switch ( strtolower( $name )
)` DRY without variable-variables, so I just switched that back to what it
was doing previously.
`$cc`, `$bcc`, and `$reply_to` initialization was moved outside the
`if/else` so that they're guaranteed to exist when they're called later by
`compact()`.
I also changed the `$address_headers` loop to `continue` early if the
array is empty, so we can have 1 less layer of indentation.
How does that look?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21659#comment:26>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list