php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25565 upgrade to 4.3.3 breaks email attachments
Submitted: 2003-09-16 17:51 UTC Modified: 2003-09-16 18:01 UTC
From: john at sysop dot com Assigned:
Status: Closed Package: Mail related
PHP Version: 4.3.3 OS: win32
Private report: No CVE-ID: None
 [2003-09-16 17:51 UTC] john at sysop dot com
Description:
------------
Running a script which attaches a Word .rtf file to an email via MIME encoding. script works fine under 4.3.2, but causes the attachment to be corrupt under 4.3.3.  Not sure why, do not fully understand the code we copied to do this.

Yeah, it's ugly code that I've no time to clean up.  Sorry.  It does work without flaw on PHP 4.3.2 Win32, though.

Only change to the server was removal of 4.3.2, insertion of 4.3.3 and a restart of IIS (5).  No changes to the script were made nor to any other software on the system.



Reproduce code:
---------------
http://www.powerpointerspage.com/php_433_mime_bug.txt

Expected result:
----------------
code SHOULD produce an email addressed to a customer which contains a text message and a MIME attachment of an RTF file.  The RTF should be immediately openable by the end user upon receipt of the email.

Actual result:
--------------
Outlook reports "The file appears to be corrupt" when doing test-sends to ourselves.  So, something during the attachment process is not working the same way as it used to - base64 encoding, chunk_split(), something along those lines.

Looking at the way in generates the mime boundary, I can tell that MD5 is working right, at least.  I do get a different, "valid" md5 string on each test-send.

The problem totally disappears upon reversion to PHP 4.3.2.  Normal email attachment resumes at that point.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-09-16 18:01 UTC] edink@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Sep 16 11:03:37 2021 UTC