0
|
1 --TEST--
|
|
2 Bug #14779 Proper header-body separator for empty attachment
|
|
3 --SKIPIF--
|
|
4 --FILE--
|
|
5 <?php
|
|
6 include "Mail/mime.php";
|
|
7
|
|
8 $m = new Mail_mime();
|
|
9 $m->addAttachment('', "text/plain", 'file.txt', FALSE, 'base64', 'attachment');
|
|
10 $result = $m->get();
|
|
11
|
|
12 if (preg_match('/(Content.*)--=.*/s', $result, $matches)) {
|
|
13 print_r($matches[1]."END");
|
|
14 }
|
|
15
|
|
16 ?>
|
|
17 --EXPECT--
|
|
18 Content-Transfer-Encoding: base64
|
|
19 Content-Type: text/plain;
|
|
20 name=file.txt
|
|
21 Content-Disposition: attachment;
|
|
22 filename=file.txt
|
|
23
|
|
24
|
|
25 END
|