Annotation of embedaddon/php/ext/mbstring/tests/mb_send_mail01.phpt, revision 1.1.1.3

1.1       misho       1: --TEST--
                      2: mb_send_mail() test 1 (lang=neutral)
                      3: --SKIPIF--
                      4: <?php
1.1.1.3 ! misho       5: if (substr(PHP_OS, 0, 3) == 'WIN') {
        !             6:        die('skip.. Not valid for Windows');
1.1.1.2   misho       7: }
1.1       misho       8: if (!function_exists("mb_send_mail") || !mb_language("neutral")) {
                      9:        die("skip mb_send_mail() not available");
                     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: /* neutral (UTF-8) */
                     23: if (mb_language("neutral")) {
                     24:        mb_internal_encoding("none");
                     25:        mb_send_mail($to, "test ".mb_language(), "test");
                     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: test neutral
                     38: MIME-Version: 1.0
                     39: Content-Type: text/plain; charset=UTF-8
                     40: Content-Transfer-Encoding: BASE64
                     41: 
                     42: dGVzdA==

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>