if(empty($html)) { $body = $text; $headers = "Content-type: text/plain; charset=windows-1251 \r\n"; #Вот так я пытался указать кодировку $to $headers .= "From: $to \r\n"; }