[wp-trac] [WordPress Trac] #29513: Move heavy lifting of wp_mail() to child class of PHPMailer

WordPress Trac noreply at wordpress.org
Thu Jul 14 15:29:04 UTC 2016


#29513: Move heavy lifting of wp_mail() to child class of PHPMailer
-----------------------------------+-----------------------------
 Reporter:  stephenharris          |       Owner:
     Type:  enhancement            |      Status:  new
 Priority:  normal                 |   Milestone:  Future Release
Component:  Mail                   |     Version:  4.0
 Severity:  normal                 |  Resolution:
 Keywords:  2nd-opinion has-patch  |     Focuses:
-----------------------------------+-----------------------------

Comment (by stephenharris):

 The `global $phpmailer` was introduced when PHPMailer was introduced in
 this change [3862]. I can't determine as to why it was implemented like
 that, but in the interest of backwards compatibility I'm tempted to say
 leave it.

 What I think we should probably consider though, is destroying and
 recreating a new PHPMailer instance each time. This would fix #33972.

 In addition to the tickets mentioned in the description, this would also
 provide a work-around for #31775

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


More information about the wp-trac mailing list