Make WordPress Core

Opened 6 years ago

Closed 13 months ago

Last modified 13 months ago

#50374 closed defect (bug) (duplicate)

Improve PHPMailer usage

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

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 GeneralMail

#2 @SirLouen
13 months ago

  • Resolutionduplicate
  • Status newclosed

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 13 months ago by SirLouen (previous) (diff)

#3 @peterwilsoncc
13 months ago

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