Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #15448, comment 86


Ignore:
Timestamp:
08/17/2025 03:04:59 PM (2 months ago)
Author:
SirLouen
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #15448, comment 86

    initial v1  
    4040My solution is simple: removing the late `Content-Type` handling for multipart and bringing it back to the specific `content-type` section. Furthermore, I provide a little regex so we can manage every single type of multipart available (not only `alternative`, but also `mixed`, `related`, etc…).
    4141
    42 I've added an additional unit test to check for this. Despite this having now been completely reviewed and ready to be shipped, I would like to add a pair of manual tests to fully close this ticket.
     42I've added a unit test to check for this. Despite this having now been completely reviewed and ready to be shipped, I would like to add a pair of manual tests to fully close this ticket.
     43
     44Also, one unit test was failing after this changes `test_wp_mail_custom_boundaries`
     45
     46For some unexplained reason, it was using `iconv_mime_decode_headers`, introduced in [48033]. I think this was an ad hoc fix to the tests because, probably, they were failing when the new version of PHPMailer was introduced in that revision. Lately, I've been reviewing in the PHPMailer library some topics regarding decoding, and by now, everything has been fixed, so using `iconv_mime_decode_headers` doesn't make sense anymore. I have reverted to the original version of this test, and it's working perfectly now.
    4347
    4448== Testing Information
     
    48521. Create a little plugin that sends a `multipart/alternative` email, and check the results.
    49532. Same but creating a `multipart/mixed`. This will also prove that this won't cause a regression with [11136].
     54
     55Both are already being tested in PHPUnit, but an extra double check will not do any harm.
     56