xref: /PHP-7.2/ext/mbstring/tests/bug52861.phpt (revision 1a0c9eca)
1--TEST--
2Bug #52681 (mb_send_mail() appends an extra MIME-Version header)
3--SKIPIF--
4<?php
5if (substr(PHP_OS, 0, 3) == 'WIN') {
6	die('skip.. Not valid for Windows');
7}
8if (!function_exists("mb_send_mail") || !mb_language("neutral")) {
9	die("skip mb_send_mail() not available");
10}
11?>
12--INI--
13sendmail_path=/bin/cat
14mail.add_x_header=off
15--FILE--
16<?php
17$to = 'example@example.com';
18$headers = 'MIME-Version: 2.0';
19
20mb_send_mail($to, mb_language(), "test", $headers);
21?>
22--EXPECTF--
23To: example@example.com
24Subject: %s
25MIME-Version: 2.0
26Content-Type: text/plain; charset=%s
27Content-Transfer-Encoding: %s
28
29%s
30