Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.10.7

Bug #1132 Fails to decode attachements with BASE64
Submitted: 2004-04-05 03:33 UTC
From: shaun at aegisdesign dot co dot uk Assigned: sean
Status: Closed Package: Mail_Mime
PHP Version: 4.3.3 OS: Linux
Roadmaps: (Not assigned)    
Comments Add Comment Add patch

Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem : 31 + 23 = ?

 [2004-04-05 03:33 UTC] shaun at aegisdesign dot co dot uk
Description: ------------ Sony Ericsson T610 mobile phones send email with attachments encoded with uppercase 'BASE64' instead of 'base64'... eg.. ----_MULTIPART_BOUNDARY_189F42D57FDCBA93 Content-Type: TEXT/PLAIN; charset="ISO-8859-1" Content-Transfer-Encoding: QUOTED-PRINTABLE Try this picture ----_MULTIPART_BOUNDARY_189F42D57FDCBA93 Content-Type: IMAGE/JPEG; name="picture(4).jpg" Content-Disposition: attachment; filename="picture(4).jpg" Content-Transfer-Encoding: BASE64 In mimeDecode.php, function _decodeBody change the switch to... switch (strtolower($encoding)) { and it will decode the attachments correctly.


 [2004-05-19 18:41 UTC] pear at woeitje dot com
i had the same problem, spend some hours looking for the bug :( i added the switch (strtolower($encoding)) as well => problem solved btw, thanks for the nice class ;)
 [2004-06-04 13:20 UTC] domi at saargate dot de
I can only confirm this problem. To make the needed change more explizit, here is a patch: --- mimeDecode.php.orig Fri Jun 4 15:29:00 2004 +++ mimeDecode.php Fri Jun 4 15:29:04 2004 @@ -522,7 +522,7 @@ */ function _decodeBody($input, $encoding = '7bit') { - switch ($encoding) { + switch (strtolower($encoding)) { case '7bit': return $input; break;
 [2004-12-07 20:53 UTC] sean at caedmon dot net Indicates that this field is case-insensitive. S
 [2004-12-07 21:06 UTC] sean at caedmon dot net
 [2004-12-08 15:13 UTC] sean
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on In case this was a website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.