[wp-trac] [WordPress Trac] #52822: PHPMailer change in WordPress 5.7 breaks working sites

WordPress Trac noreply at wordpress.org
Thu Mar 25 13:12:09 UTC 2021

#52822: PHPMailer change in WordPress 5.7 breaks working sites
 Reporter:  tigertech                |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  high                     |   Milestone:  5.7.1
Component:  Mail                     |     Version:  5.7
 Severity:  normal                   |  Resolution:
 Keywords:  needs-patch 2nd-opinion  |     Focuses:

Comment (by SergeyBiryukov):

 Replying to [comment:4 audrasjb]:
 > I’m not a specialist of PHPMailer, but for 5.7.1, I can see several
 > - Find a way to override PHPMailer settings
 > - Directly edit the PHPMailer lib (this is not something we want)
 > - Rollback PHPMailer to its previous version (same as above!)
 > For more context, after a quick search, I think the issue comes from
 this upstream function:
 > (the new default value of the third parameter – `$auto = true` – I can’t
 tell why but it looks like the issue is related to this change)

 Thanks! Just noting that the parameter is not new in PHPMailer 6.3.0, it
 was added 11 years ago in version 5.1, see the
 upstream commit] and [17676] for core. The `wp_mail()` function in
 WordPress [source:tags/5.7/src/wp-includes/pluggable.php?marks=397#L387
 explicitly passes `false`] there.

 I think the issue comes from this commit:

 It should be possible to override the default settings using the
 `phpmailer_init` action, as suggested in comment:2, so I think the first
 option would be the preferred way here. It's also worth checking if any
 issues have been submitted upstream for this change.

Ticket URL: <https://core.trac.wordpress.org/ticket/52822#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list