#50374 closed defect (bug) (duplicate)
Improve PHPMailer usage
| Reported by: | ayeshrajans | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | 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.
This is correct, and I've found it has been massively reported.
When setting custom headers, the
boundaryis removed as it fall back as a regularplainemail. This could be improved with a right implementation of multipart, so this has become essentially a duplicate of #15448But still, I believe that
CustomHeadersare 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.