[wp-trac] [WordPress Trac] #21659: wp_mail() problem with Reply-To header
WordPress Trac
noreply at wordpress.org
Thu Jun 30 23:23:47 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:
--------------------------------------+-----------------------------
Changes (by iandunn):
* keywords: has-patch => has-patch has-unit-tests
Comment:
Refreshed the patch and added unit tests.
I also refactored a few things to keep the function DRY, but I'm happy to
back that out if it feels like too much.
I also went ahead and updated `wp_mail()` to use `$phpmailer->setFrom()`,
rather than accessing the object members directly. I think that's
argubably within the scope of the ticket, since the underlying bug here is
that `wp_mail()` is treating addresses as if they're generic strings. In
reality, they require special handling, and using the methods PHPMailer
provides will run them through the appropriate processing and avoid other
potential bugs. I'm happy to remove that from the patch too, though, if it
seems like too much.
@stephenharris, I'd love to get any feedback you have on this.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21659#comment:24>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list