[wp-trac] [WordPress Trac] #50720: PHPMailer's validator defaults to 'php' after the upgrade

WordPress Trac noreply at wordpress.org
Mon Jul 27 12:46:49 UTC 2020


#50720: PHPMailer's validator defaults to 'php' after the upgrade
----------------------------------------------------+---------------------
 Reporter:  david.binda                             |       Owner:  (none)
     Type:  defect (bug)                            |      Status:  new
 Priority:  normal                                  |   Milestone:  5.5
Component:  Mail                                    |     Version:
 Severity:  normal                                  |  Resolution:
 Keywords:  has-patch needs-testing has-unit-tests  |     Focuses:
----------------------------------------------------+---------------------

Comment (by david.binda):

 Yeah, that's correct. The tests I provided were more a demonstration than
 tests :) Sorry for the confusion.

 However, in case a plugin is overriding the `wp_mail` function (as it's a
 pluggable function), the `is_email` won't be set as a validator.

 That's why I was originally proposing to set the validator outside the
 `wp_mail` function, so it would affect all other usages, even in case the
 function is overridden, or the PHPMailer's instance is being used
 directly.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50720#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list