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