Imam html datiteku sa kontakt formom koja je u utf8 encodingu imam u <head> ovo:
Code:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
ovako izgleda send.php:
Code:
<?php
$EmailFrom = Trim(stripslashes($_POST['email']));
$EmailTo = "xxx@xxx.com";
$Subject = Trim(stripslashes($_POST['name0']));
$Name = Trim(stripslashes($_POST['name']));
$Message = Trim(stripslashes($_POST['message']));
$headers = "Content-Type: text/plain; charset=UTF-8\n";
$Body = "";
$Body .= "Ime: ";
$Body .= $Name;
$Body .= "\n";
$Body .= "\n";
$Body .= "Poruka:";
$Body .= "\n";
$Body .= $Message;
$Body .= "\n";
// send email
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>", $headers);
if ($success){
print "<meta http-equiv=\"refresh\" content=\"0;URL=..\uspjeh.html\">";
}
else{
print "<meta http-equiv=\"refresh\" content=\"0;URL=..\pogreska.html\">";
}
?>
I nikako mi neće hrvatske znakove windows live mail prikazati, niti aplikacija na androidu.
Kada mail otvorim u webmailu (mozila je na utf8 encodingu) onda mi u poruci prikazuje hr znakove ali u subjectu ne.
Zna li netko kako da postignem željeno?
Hvala!