This is the code:
<?php
if($_POST["message"]) {
mail("[email protected]", "Note To Self", $_POST["message"], "From: [email protected]");
header( "Location: sent.html" );
}
?>
English characters are working fine but Chinese, Japanese and Korean come out in the email like this:
ムコ 猫 ê³ ì–‘ì ´
Based on this topic: Charset UTF-8 not working on <?php contact form I added content type and character set:
<?php
if($_POST["message"]) {
mail("[email protected]", "Note To Self", $_POST["message"], "From: [email protected]", "Content-Type: text/html; charset=UTF-8");
header( "Location: sent.html" );
}
?>
but now I don't receive the emails at all. What am I doing wrong?
I've got it working now. Multiple extra headers should be separated with a CRLF (\r\n).