Ticket #1485389 (closed Bugs: fixed)

Opened 2 years ago

Last modified 22 months ago

missing double newline when sending empty file

Reported by: tensor Owned by:
Priority: 5 Milestone: 0.2-stable
Component: MIME parsing Version: 0.2-alpha
Severity: trivial Keywords:
Cc:

Description

When sending one empty file, two newlines are not added after the last header for the part, only one. As a result, Thunderbird does not show that there is an attached file.

If I send two or more empty files, for all the files there are three new lines after the last part header, however, for the last file, there is only one newline after the last part header.

Change History

Changed 2 years ago by alec

  • component changed from PHP backend to MIME parsing

Here's a patch. Should be tested, I have no idea why there was rtrim() used.

--- mimePart.old        2008-09-29 09:40:35.000000000 +0200
+++ mimePart.php        2008-10-04 20:19:17.073546934 +0200
@@ -257,7 +257,7 @@
             }

             $encoded['body'] = '--' . $boundary . MAIL_MIMEPART_CRLF .
-                               rtrim(implode('--' . $boundary . MAIL_MIMEPART_CRLF , $subparts), MAIL_MIMEPART_CRLF) . MAIL_MIMEPART_CRLF .
+                               implode('--' . $boundary . MAIL_MIMEPART_CRLF , $subparts) .
                                '--' . $boundary.'--' . MAIL_MIMEPART_CRLF;

         } else {

Changed 22 months ago by alec

  • status changed from new to closed
  • resolution set to fixed

Cannot wait for Mail_MIME developers. Patch applied in r2043.

Note: See TracTickets for help on using tickets.