| 1 |
lars |
1 |
--TEST--
|
|
|
2 |
Bug #17175 Content-Description support+ecoding
|
|
|
3 |
--SKIPIF--
|
|
|
4 |
--FILE--
|
|
|
5 |
<?php
|
|
|
6 |
error_reporting(E_ALL); // suppress E_STRICT errors
|
|
|
7 |
|
|
|
8 |
require_once('Mail/mime.php');
|
|
|
9 |
|
|
|
10 |
$Mime = new Mail_Mime();
|
|
|
11 |
$Mime->setTXTBody('Test message.');
|
|
|
12 |
$Mime->addAttachment('test file contents', "text/plain",
|
|
|
13 |
'test.txt', FALSE, 'base64', NULL, 'UTF-8', NULL, NULL, NULL, NULL,
|
|
|
14 |
'desc');
|
|
|
15 |
$Mime->addAttachment('test file contents', "text/plain",
|
|
|
16 |
'test2.txt', FALSE, 'base64', NULL, 'UTF-8', NULL, NULL, NULL, NULL,
|
|
|
17 |
'test unicode żąśź');
|
|
|
18 |
|
|
|
19 |
$body = $Mime->getMessage();
|
|
|
20 |
preg_match_all('/Content-Description: (.*)/', $body, $matches);
|
|
|
21 |
foreach ($matches[1] as $value)
|
|
|
22 |
echo $value."\n";
|
|
|
23 |
?>
|
|
|
24 |
--EXPECT--
|
|
|
25 |
desc
|
|
|
26 |
=?UTF-8?Q?test_unicode_=C5=BC=C4=85=C5=9B=C5=BA?=
|