Make WordPress Core

Opened 6 years ago

Closed 9 months ago

Last modified 9 months ago

#50374 closed defect (bug) (duplicate)

Improve PHPMailer usage

Reported by: ayeshrajans's profile ayeshrajans Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Mail Keywords:
Focuses: Cc:

Description

Related to the ticket #41750

We finally have PHPMailer 6 in WordPress core. The PHPMailer author noticed that there are some improvements in the way we use PHPMailer.

if you're setting content-type headers and boundaries via addCustomHeader, you're using PHPMailer wrong! (https://core.trac.wordpress.org/ticket/41750#comment:41)

I would like to request comments and thoughts on taking a good look at how we use PHPMailer. I suspect these outdated patterns were used when WordPress had PHPMailer 5.x series. Now that we use PHPMailer 6, we can review and improve how we use it.

PHPMailer 6 upgrade milestone is WordPress 5.5. It would be great if we ship these changes with same version.

Change History (3)

#1 @SergeyBiryukov
6 years ago

  • Component changed from General to Mail

#2 @SirLouen
9 months ago

  • Resolution set to duplicate
  • Status changed from new to closed

This is correct, and I've found it has been massively reported.

When setting custom headers, the boundary is removed as it fall back as a regular plain email. This could be improved with a right implementation of multipart, so this has become essentially a duplicate of #15448

But still, I believe that CustomHeaders are still right and should be admitted by PHPMailer. I have reported this upstream, and we will see if we can have optionally working both implementations.

When we sort out the multipart problem, this will be sorted also. I hope we can achieve this before 6.9 release. Stay tuned to the other report.

Last edited 9 months ago by SirLouen (previous) (diff)

#3 @peterwilsoncc
9 months ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.