FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=12411&edit=1

ID: 12411
Updated by: alec@alec.pl
Reported By: bmdevelopment at gmail dot com
Summary: Support RFC 2047 standard for non-ascii characters as
attachment filename.
-Status: Assigned
+Status: Closed
Type: Feature/Change Request
Package: Mail_Mime
Operating System: FreeBSD 6.2-RELEASE #0
Package Version: 1.5.2
PHP Version: 5.2.4
Assigned To: alec
Roadmap Versions:
New Comment:

-Status: Assigned
+Status: Closed
This bug has been fixed in SVN.

If this was a documentation problem, the fix will appear on
pear.php.net by the end of next Sunday (CET).

If this was a problem with the pear.php.net website, the change should
be live shortly.

Otherwise, the fix will appear in the package's next release.

Thank you for the report and for helping us make PEAR better.




Previous Comments:
------------------------------------------------------------------------

[2009-12-30 12:34:20] alec

-Assigned To:
+Assigned To: alec
-Roadmap Versions:
+Roadmap Versions: 1.6.0RC1


------------------------------------------------------------------------

[2009-12-03 13:41:27] alec

Updated my bulk patch. Contains fixes for test scripts.

------------------------------------------------------------------------

[2009-12-03 13:39:38] alec

Added #patch bug:12411;patch:mime_bulk.patch;revision:1259847578;.

------------------------------------------------------------------------

[2009-06-17 11:59:40] alec

I've attached a bulk patch which addresses issues #12411, #12429,
#14232, #15320, #14529, #14779. Test script:
<?php

include('Mail/mime.php');

$text = '';
$crlf = "\n";
$file = 'empty.txt'; //some empty file
$files = array(
'empty.txt',
'with space.txt',
'with unicode &#380;&#261;&#347;&#378;&#263;.txt',
'long name with spaces, very long long long long long very very
long long.txt',
'long name with spaces, very long long long long long very very and
&#380;&#261;&#347;&#378;&#281;&#263;.txt',
);
$mime = new Mail_mime($crlf);

foreach ($files as $name) {
copy($file, '/tmp/'.$name);
$mime->addAttachment('/tmp/'.$name, 'text/plain', '', true,
'base64', 'attachment', 'UTF-8', '', '',
'quoted-printable');
}

$mime->setTXTBody($text);

echo $mime->getMessage();

?>

And result:

MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="=_8ea5f688b1cf8f2db7d4f37126f5ac3f"

--=_8ea5f688b1cf8f2db7d4f37126f5ac3f
Content-Transfer-Encoding: base64
Content-Type: text/plain charset=UTF-8;;
name=empty.txt;
Content-Disposition: attachment;
filename=empty.txt;


--=_8ea5f688b1cf8f2db7d4f37126f5ac3f
Content-Transfer-Encoding: base64
Content-Type: text/plain charset=UTF-8;;
name="with space.txt";
Content-Disposition: attachment;
filename="with space.txt";


--=_8ea5f688b1cf8f2db7d4f37126f5ac3f
Content-Transfer-Encoding: base64
Content-Type: text/plain charset=UTF-8;;
name="=?UTF-8?Q?with_unicode_=C5=BC=C4=85=C5=9B=C5=BA=C4=87.txt?=";
Content-Disposition: attachment;
filename*=UTF-8''with%20unicode%20%C5%BC%C4%85%C5%9B%C5%BA%C4%87.txt;


--=_8ea5f688b1cf8f2db7d4f37126f5ac3f
Content-Transfer-Encoding: base64
Content-Type: text/plain charset=UTF-8;;
name="long name with spaces, very long long long long long very very
lo.txt";
Content-Disposition: attachment;

filename*0*=UTF-8''long%20name%20with%20spaces,%20very%20long%20long%20long;
filename*1*=%20long%20long%20very%20very%20long%20long.txt;


--=_8ea5f688b1cf8f2db7d4f37126f5ac3f
Content-Transfer-Encoding: base64
Content-Type: text/plain charset=UTF-8;;

name="=?UTF-8?Q?long_name_with_spaces,_very_long_long_long_long_long_very_v.txt?=";

Content-Disposition: attachment;

filename*0*=UTF-8''long%20name%20with%20spaces,%20very%20long%20long%20long;

filename*1*=%20long%20long%20very%20very%20and%20%C5%BC%C4%85%C5%9B%C5%BA%C4;
filename*2*=%99%C4%87.txt;


--=_8ea5f688b1cf8f2db7d4f37126f5ac3f--

------------------------------------------------------------------------

[2009-06-17 11:54:36] alec

The following patch has been added/updated:

Patch Name: mime_bulk.patch
Revision: 1245236075
URL:
http://pear.php.net/bugs/patch-display.php?bug=12411&patch=mime_bulk.patch&revision=1245236075&display=1

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://pear.php.net/bugs/bug.php?id=12411

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedJan 1, '10 at 2:12p
activeJan 1, '10 at 2:12p
posts1
users1
websitepear.php.net

1 user in discussion

Alec: 1 post

People

Translate

site design / logo © 2022 Grokbase