Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When sending a "multipart/alternative" message where the HTML portion is base64 encoded, the Content-Transfer-Encoding is not set properly if there is no space in the "Content-Transfer-Encoding" header after the colon.
For example, sending a message with the following body will NOT mark the section with base64 encoding as being base64 encoded, so the raw base64 text will be displayed in the recipient's email client:
This is a multi-part message in MIME format. --9a8f7e25b7f276955e4f41094c87281db5db920e1 Content-Type:multipart/alternative; boundary="0e8885444c69ad0beca8e4c92eb849283046ce530" Content-Transfer-Encoding:8bit --0e8885444c69ad0beca8e4c92eb849283046ce530 Content-Type:text/plain; charset=utf-8 Content-Disposition:inline Content-Transfer-Encoding:8bit [SOME TEXT] --0e8885444c69ad0beca8e4c92eb849283046ce530 Content-Type:text/html; charset=utf-8 Content-Disposition:inline Content-Transfer-Encoding:base64 [SOME BASE46 ENCODED CONTENT] --0e8885444c69ad0beca8e4c92eb849283046ce530-- --9a8f7e25b7f276955e4f41094c87281db5db920e1--
Comment | File | Size | Author |
---|---|---|---|
#10 | smtp-2909678-10.patch | 905 bytes | espurnes |
| |||
#8 | smtp-2909678-8.patch | 907 bytes | jlicht |
| |||
#6 | smtp-2909678-4-d8.patch | 873 bytes | jlicht |
| |||
#4 | smtp-2909678-3-d8.patch | 893 bytes | jlicht |
#2 | smtp-2909678-2-d8.patch | 957 bytes | jlicht |
Comments
Comment #2
jlicht CreditAttribution: jlicht commentedHere is the fix.
Comment #4
jlicht CreditAttribution: jlicht commentedReuploading patch, with fixed paths
Comment #6
jlicht CreditAttribution: jlicht commentedOne more time...
Comment #7
Chris Matthews CreditAttribution: Chris Matthews as a volunteer and at City of Oaks Design commentedThe 2 year old patch in #6 no longer applies to 8.x-1.x-dev.
Comment #8
jlicht CreditAttribution: jlicht commentedReroll against 8.x-1.x-dev
Comment #9
Chris Matthews CreditAttribution: Chris Matthews as a volunteer and at City of Oaks Design commentedRemoving 'Needs reroll' tag
Comment #10
espurnesReroll against 8.x-1.x-dev.
It just updates line numbers.
Comment #11
carsonwWe were experiencing unencoded base64 email content (smtp + mimemail + webform), and after a long journey of troubleshooting, I discovered this issue, and this patch saved the day.
Comment #13
japerryFixed.