xref: /PHP-7.3/ext/imap/tests/bug31142_2.phpt (revision b746e698)
1--TEST--
2Bug #31142 test #2 (imap_mail_compose() generates incorrect output)
3--SKIPIF--
4<?php
5        if (!extension_loaded("imap")) {
6                die("skip imap extension not available");
7        }
8?>
9--FILE--
10<?php
11$envelope["from"]= 'host@domain.com';
12$envelope["return_path"]= 'host@domain.com';
13
14$part1["type"]=TYPETEXT;
15$part1["subtype"]="plain";
16$part1["encoding"]=ENCQUOTEDPRINTABLE ;
17$part1["charset"]='iso-8859-2';
18$part1["contents.data"]=imap_8bit('asn řkl');
19
20$body = array($part1);
21
22echo imap_mail_compose($envelope, $body);
23?>
24--EXPECT--
25From: host@domain.com
26MIME-Version: 1.0
27Content-Type: TEXT/plain; CHARSET=iso-8859-2
28Content-Transfer-Encoding: QUOTED-PRINTABLE
29
30asn =C5=99kl
31