[wp-trac] [WordPress Trac] #33972: static use of PHPMailer class results in stale state between calls to wp_mail()

WordPress Trac noreply at wordpress.org
Mon Apr 18 14:01:51 UTC 2016


#33972: static use of PHPMailer class results in stale state between calls to
wp_mail()
--------------------------+------------------------------
 Reporter:  codebuddy     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Mail          |     Version:  4.3
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+------------------------------

Comment (by stephenharris):

 I've written a test which (almost) replicates this. The test unexpectedly
 passes because of changes made to the mock PHPMailer class explicitly
 designed to suppress this behaviour (see #28909).

 In my view we should be creating a new PHPMailer instance for each email,
 not trying to reset the instance for each e-mail (evidently PHPMailer
 doesn't allow us to do that).

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


More information about the wp-trac mailing list