1--TEST--
2mb_send_mail() test 3 (lang=English)
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("english")) {
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/* English (iso-8859-1) */
25if (mb_language("english")) {
26    mb_internal_encoding("ISO-8859-1");
27    mb_send_mail($to, "test ".mb_language(), "test");
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: test English
40MIME-Version: 1.0
41Content-Type: text/plain; charset=%s-8859-1
42Content-Transfer-Encoding: 8bit
43
44test
45