xref: /PHP-8.1/ext/mbstring/tests/bug52681.phpt (revision 6600ad60)
1--TEST--
2Bug #52681 (mb_send_mail() appends an extra MIME-Version header)
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("neutral")) {
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$headers = 'MIME-Version: 2.0';
21
22mb_send_mail($to, mb_language(), "test", $headers);
23?>
24--EXPECTF--
25To: example@example.com
26Subject: %s
27MIME-Version: 2.0
28Content-Type: text/plain; charset=%s
29Content-Transfer-Encoding: %s
30
31%s
32