邮件已到达,但未经过utf8编码,因此有时看起来像这样: Ãœ¼Ã„ äÖöÖp
我是php和编码的新手,所以如果有人可以提供帮助-请!我不知道在哪里定义UTF-8
<?php
$recipient = "info@test.de";
$fmtResponse= implode("", file("response.php"));
$fmtMail= implode("", file("mail.htt"));
foreach($_POST as $key=> $val) {
$fmtResponse= str_replace("<$key>", $val, $fmtResponse);
$fmtMail= str_replace("<$key>", $val, $fmtMail);
}
if ($_POST["access"] == "irregeheim") {
mail($recipient, $_POST["subject"], $fmtMail);
}
echo $fmtResponse;
?>