mb_send_mail04.phpt 901 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --TEST--
  2. mb_send_mail() test 4 (lang=German)
  3. --SKIPIF--
  4. <?php
  5. if (substr(PHP_OS, 0, 3) == 'WIN') {
  6. die('skip.. Not valid for Windows');
  7. }
  8. if (!function_exists("mb_send_mail") || !mb_language("german")) {
  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. /* default setting */
  19. mb_send_mail($to, mb_language(), "test");
  20. /* German (iso-8859-15) */
  21. if (mb_language("german")) {
  22. mb_internal_encoding("ISO-8859-15");
  23. mb_send_mail($to, "Pr"."\xfc"."fung ".mb_language(), "Pr"."\xfc"."fung");
  24. }
  25. ?>
  26. --EXPECTF--
  27. To: example@example.com
  28. Subject: %s
  29. MIME-Version: 1.0
  30. Content-Type: text/plain; charset=%s
  31. Content-Transfer-Encoding: %s
  32. %s
  33. To: example@example.com
  34. Subject: =?ISO-8859-15?Q?Pr=FCfung=20German?=
  35. MIME-Version: 1.0
  36. Content-Type: text/plain; charset=%s-8859-15
  37. Content-Transfer-Encoding: 8bit
  38. Prüfung