1--TEST--
2mb_send_mail() test 2 (lang=Japanese)
3--EXTENSIONS--
4mbstring
5--SKIPIF--
6<?php
7if (!function_exists("mb_send_mail") || !mb_language("japanese")) {
8    die("skip mb_send_mail() not available");
9}
10?>
11--INI--
12sendmail_path={MAIL:{PWD}/mb_send_mail02.eml}
13mail.add_x_header=off
14--FILE--
15<?php
16$to = 'example@example.com';
17
18/* default setting */
19mb_send_mail($to, mb_language(), "test");
20readfile(__DIR__ . "/mb_send_mail02.eml");
21
22/* Japanese (EUC-JP) */
23if (mb_language("japanese")) {
24    mb_internal_encoding('EUC-JP');
25    mb_send_mail($to, "�ƥ��� ".mb_language(), "�ƥ���");
26    readfile(__DIR__ . "/mb_send_mail02.eml");
27}
28?>
29--CLEAN--
30<?php
31@unlink(__DIR__ . "/mb_send_mail02.eml");
32?>
33--EXPECTF--
34To: example@example.com
35Subject: %s
36MIME-Version: 1.0
37Content-Type: text/plain; charset=%s
38Content-Transfer-Encoding: %s
39
40%s
41To: example@example.com
42Subject: =?ISO-2022-JP?B?GyRCJUYlOSVIGyhCIEphcGFuZXNl?=
43MIME-Version: 1.0
44Content-Type: text/plain; charset=ISO-2022-JP
45Content-Transfer-Encoding: 7bit
46
47$B%F%9%H(B
48