php mail() function UTF8 проблем

freshbg

Registered
Сайта ми е закодиран на UTF-8 и когато изпращам имейл чрез него писмата се получават на маймуница вместо на кирилица :(

Ето го кода:
Код:
$to      = $email; // имейл чрез GET
$subject = 'Успешна регистрация';
$headers = 'From: no-reply@mail.com' . "\r\n" .
    'Reply-To: no-reply@mail.com' . "\r\n" .
	'MIME-Version: 1.0' . "\r\n" .
	'Content-type: text/html; charset=UTF-8' . "\r\n" .
mail($to, $subject, $message, $headers);

Как да го оправя така че писмата да се получават както са написани - на кирлица?
 
Код:
$headers  = 'MIME-Version: 1.0'."\r\n";
$headers .= "Content-Type: text/html; charset=utf-8 \r\n";
$headers .= "From: ".$email." \r\n";
mail($email_to,'=?UTF-8?B?'.base64_encode($title).'?=',$info,$headers);

Само да добавя, че това прави емайла с html. Ако неискаш да е с html смени text/html с text/plain
$headers .= "Content-Type: text/html; charset=utf-8 \r\n";
 
Код:
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: multipart/alternative; boundary=\"$mime_boundary\"\n";

$message .= "--$mime_boundary\n";
$message .= "Content-Type: text/html; charset=UTF-8\n";
$message .= "Content-Transfer-Encoding: 8bit\n\n";
 
Код:
$to      = $email; // имейл чрез GET
$subject = 'Успешна регистрация';
$headers = 'From: no-reply@mail.com' . "\r\n" .
    'Reply-To: no-reply@mail.com' . "\r\n" .
	'MIME-Version: 1.0' . "\r\n" .
	'Content-type: text/html; charset=windows-1251' . "\r\n" .
mail($to, $subject, $message, $headers);
 

Back
Горе