1--TEST--
2mb_send_mail() test 1 (lang=neutral)
3--EXTENSIONS--
4mbstring
5--SKIPIF--
6<?php
7if (!function_exists("mb_send_mail") || !mb_language("neutral")) {
8    die("skip mb_send_mail() not available");
9}
10?>
11--INI--
12sendmail_path={MAIL:{PWD}/mb_send_mail01.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_mail01.eml");
21
22/* neutral (UTF-8) */
23if (mb_language("neutral")) {
24    mb_internal_encoding("UTF-8");
25    mb_send_mail($to, "test ".mb_language(), "test");
26    readfile(__DIR__ . "/mb_send_mail01.eml");
27}
28?>
29--CLEAN--
30<?php
31@unlink(__DIR__ . "/mb_send_mail01.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: test neutral
43MIME-Version: 1.0
44Content-Type: text/plain; charset=UTF-8
45Content-Transfer-Encoding: BASE64
46
47dGVzdA==
48