RsD0p9BK
7/10/2013 - 1:51 PM

sendmail.php

function sendMail ($from, $to, $title, $message){
  $headers  = "MIME-Version: 1.0\r\n";
  $headers .= "Content-type: text/html; charset=\"windows-1251\"\r\n";
  $headers .= "From: ".$from."\r\n";
  @mail(
    mb_convert_encoding($to, 'windows-1251', 'utf-8'),
    mb_convert_encoding($title, 'windows-1251', 'utf-8'),
    mb_convert_encoding($message, 'windows-1251', 'utf-8'),
    mb_convert_encoding($headers, 'windows-1251', 'utf-8')
  );
}
sendMail ('from@mail.ru', 'to@mail.ru', 'title','message');