1--TEST--
2mb_send_mail() test 5 (lang=Simplified Chinese)
3--EXTENSIONS--
4mbstring
5--SKIPIF--
6<?php
7if (!function_exists("mb_send_mail") || !mb_language("Simplified Chinese")) {
8    die("skip mb_send_mail() not available");
9}
10if (!@mb_internal_encoding('GB2312')) {
11    die("skip GB2312 encoding is not available on this platform");
12}
13?>
14--INI--
15sendmail_path={MAIL:{PWD}/mb_send_mail05.eml}
16mail.add_x_header=off
17--FILE--
18<?php
19$to = 'example@example.com';
20
21/* default setting */
22mb_send_mail($to, mb_language(), "test");
23readfile(__DIR__ . "/mb_send_mail05.eml");
24
25/* Simplified Chinese (HK-GB-2312) */
26if (mb_language("simplified chinese")) {
27    mb_internal_encoding('GB2312');
28    mb_send_mail($to, "���� ".mb_language(), "����");
29    readfile(__DIR__ . "/mb_send_mail05.eml");
30}
31?>
32--CLEAN--
33<?php
34@unlink(__DIR__ . "/mb_send_mail05.eml");
35?>
36--EXPECTF--
37To: example@example.com
38Subject: %s
39MIME-Version: 1.0
40Content-Type: text/plain; charset=%s
41Content-Transfer-Encoding: %s
42
43%s
44To: example@example.com
45Subject: =?HZ-GB-2312?B?fnsyYlFpfn0gU2ltcGxpZmllZCBD?=
46 =?HZ-GB-2312?B?aGluZXNl?=
47MIME-Version: 1.0
48Content-Type: text/plain; charset=HZ-GB-2312
49Content-Transfer-Encoding: 7bit
50
51~{2bQi~}
52