I use this code to send an email:
$headers="MIME-Version: 1.0"."\n";
$headers.="Content-type: text/plain; charset=UTF-8"."\n";
$headers.="From: $name <$email>"."\n";
mail($to, '=?UTF-8?B?'.base64_encode($subject).'?=', $text, $headers, '
[email protected]');
If I use special characters Å Ä Ö from the swedish alphabet, they are not encoded properly, so they turn up like ö for ö.
However, this doesn't happen if I change the $to variable to a gmail account email, then they are shown correctly.
Anybody got any idea?
Thanks
UPDATE:
When I echo $name, the name is displayed correctly, in utf8, with all special chars nicely shown.