2002-11-12 20:04:58 +00:00
|
|
|
--TEST--
|
|
|
|
mb_send_mail() test 3 (lang=English)
|
|
|
|
--SKIPIF--
|
|
|
|
<?php
|
2012-04-10 09:47:18 +00:00
|
|
|
if (substr(PHP_OS, 0, 3) == 'WIN') {
|
|
|
|
die('skip.. Not valid for Windows');
|
2011-09-11 13:04:21 +00:00
|
|
|
}
|
2006-06-27 00:09:23 +00:00
|
|
|
if (!function_exists("mb_send_mail") || !mb_language("english")) {
|
2002-11-12 20:04:58 +00:00
|
|
|
die("skip mb_send_mail() not available");
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
--INI--
|
2003-09-24 02:27:43 +00:00
|
|
|
sendmail_path=/bin/cat
|
2010-04-12 14:05:00 +00:00
|
|
|
mail.add_x_header=off
|
2002-11-12 20:04:58 +00:00
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
$to = 'example@example.com';
|
|
|
|
|
|
|
|
/* default setting */
|
|
|
|
mb_send_mail($to, mb_language(), "test");
|
|
|
|
|
|
|
|
/* English (iso-8859-1) */
|
|
|
|
if (mb_language("english")) {
|
2002-11-21 18:12:53 +00:00
|
|
|
mb_internal_encoding("ISO-8859-1");
|
2002-11-12 20:04:58 +00:00
|
|
|
mb_send_mail($to, "test ".mb_language(), "test");
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
|
|
|
To: example@example.com
|
|
|
|
Subject: %s
|
2010-08-25 06:07:22 +00:00
|
|
|
MIME-Version: 1.0
|
2002-11-12 20:04:58 +00:00
|
|
|
Content-Type: text/plain; charset=%s
|
|
|
|
Content-Transfer-Encoding: %s
|
|
|
|
|
2003-05-14 00:36:00 +00:00
|
|
|
%s
|
2002-11-12 20:04:58 +00:00
|
|
|
To: example@example.com
|
|
|
|
Subject: test English
|
2010-08-25 06:07:22 +00:00
|
|
|
MIME-Version: 1.0
|
2002-11-12 20:04:58 +00:00
|
|
|
Content-Type: text/plain; charset=%s-8859-1
|
|
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
|
|
|
|
test
|