2 Bug #40854 (imap_mail_compose() creates an invalid terminator for multipart e-mails)
5 if (!extension_loaded("imap")) {
6 die("skip imap extension not available");
11 $envelope["from"]= "joe@example.com";
12 $envelope["to"] = "foo@example.com";
13 $envelope["cc"] = "bar@example.com";
15 $part1["type"] = TYPEMULTIPART;
16 $part1["subtype"] = "mixed";
18 $part2["type"] = TYPEAPPLICATION;
19 $part2["encoding"] = ENCBINARY;
20 $part2["subtype"] = "octet-stream";
21 $part2["description"] = 'a.txt';
22 $part2["contents.data"] = '';
24 $part3["type"] = TYPETEXT;
25 $part3["subtype"] = "plain";
26 $part3["description"] = "description3";
27 $part3["contents.data"] = "contents.data3\n\n\n\t";
33 echo imap_mail_compose($envelope, $body);
40 Content-Type: MULTIPART/mixed; BOUNDARY="%s"
43 Content-Type: APPLICATION/octet-stream
44 Content-Transfer-Encoding: BASE64
45 Content-Description: a.txt
50 Content-Type: TEXT/plain; CHARSET=US-ASCII
51 Content-Description: description3