Annotation of embedaddon/php/ext/mbstring/tests/mb_send_mail05.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: mb_send_mail() test 5 (lang=Simplified Chinese)
3: --SKIPIF--
4: <?php
5: if (!function_exists("mb_send_mail") || !mb_language("Simplified Chinese")) {
6: die("skip mb_send_mail() not available");
7: }
8: if (!@mb_internal_encoding('GB2312')) {
9: die("skip GB2312 encoding is not available on this platform");
10: }
11: ?>
12: --INI--
13: sendmail_path=/bin/cat
14: mail.add_x_header=off
15: --FILE--
16: <?php
17: $to = 'example@example.com';
18:
19: /* default setting */
20: mb_send_mail($to, mb_language(), "test");
21:
22: /* Simplified Chinese (HK-GB-2312) */
23: if (mb_language("simplified chinese")) {
24: mb_internal_encoding('GB2312');
25: mb_send_mail($to, "²βΡι ".mb_language(), "²βΡι");
26: }
27: ?>
28: --EXPECTF--
29: To: example@example.com
30: Subject: %s
31: MIME-Version: 1.0
32: Content-Type: text/plain; charset=%s
33: Content-Transfer-Encoding: %s
34:
35: %s
36: To: example@example.com
37: Subject: =?HZ-GB-2312?B?fnsyYlFpfn0gU2ltcGxpZmllZCBD?=
38: =?HZ-GB-2312?B?aGluZXNl?=
39: MIME-Version: 1.0
40: Content-Type: text/plain; charset=HZ-GB-2312
41: Content-Transfer-Encoding: 7bit
42:
43: ~{2bQi~}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>