1--TEST--
2mb_send_mail() test 2 (lang=Japanese)
3--EXTENSIONS--
4mbstring
5--SKIPIF--
6<?php
7if (substr(PHP_OS, 0, 3) == 'WIN') {
8    die('skip.. Not valid for Windows');
9}
10if (!function_exists("mb_send_mail") || !mb_language("japanese")) {
11    die("skip mb_send_mail() not available");
12}
13?>
14--INI--
15sendmail_path=/bin/cat
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");
23
24/* Japanese (EUC-JP) */
25if (mb_language("japanese")) {
26    mb_internal_encoding('EUC-JP');
27    mb_send_mail($to, "�ƥ��� ".mb_language(), "�ƥ���");
28}
29?>
30--EXPECTF--
31To: example@example.com
32Subject: %s
33MIME-Version: 1.0
34Content-Type: text/plain; charset=%s
35Content-Transfer-Encoding: %s
36
37%s
38To: example@example.com
39Subject: =?ISO-2022-JP?B?GyRCJUYlOSVIGyhCIEphcGFuZXNl?=
40MIME-Version: 1.0
41Content-Type: text/plain; charset=ISO-2022-JP
42Content-Transfer-Encoding: 7bit
43
44$B%F%9%H(B
45