Code:
<?php   
$to  =  $_POST['to'];  
$from = $_POST['ot'];  
$subject = $_POST['tema'];   
$message = $_POST['message'];   

$headers .= "From: ".$from;   

if ($_POST['radio']==="plain")  
{  
$headers  = "Content-type: text/plain; charset=windows-1251 \r\n";
 $headers .= "From: ".$from;     
}  
elseif ($_POST['radio']==="html") 
{  
$headers  = "Content-type: text/html; charset=windows-1251 \r\n"; 
 $headers .= "From: ".$from;    
}  
mail($to, $subject, $message, $headers);   

?>  
<script>  // some js for correction check 
            function check(obj){ 
                var return_value = true; 
                  var emailot = obj.ot.value;  // from who
                var emailto = obj.to.value;  // to ?
                var tema = obj.tema.value; // subj
                var msg = obj.message.value; // message textarea
                var err = "Input data is not corrent, check it plz "; 
                 
                if(emailot == ""){ 
                    err += " Email from "; 
                    return_value = false; 
                } 
                if(emailto == ""){ 
                    err += "Email to "; 
                    return_value = false; 
                } 
                if(tema == ""){ 
                    err += " Subject "; 
                    return_value = false; 
                } 
                if(msg == ""){ 
                    err += "Text Data"; 
                    return_value = false; 
                } 
                //check all , if find some err, alert  
                if(!return_value) 
                    alert(err); 
                    
                return return_value; 
            } 
        </script> 
<html>  
<head><title>Test Send!</title>  
</head>  
<body>  
<form action="" method="post" onsubmit="return check(this);">  
<table cellpadding="3" cellspacing="3" border="0" align="center">  
<tr align="left">  
<td>Email from:</td><td><input name="ot"></td><tr>  
<tr align="left"><td>Email to:</td><td><input name="to"></td></tr>  
<tr align="left"><td>Subj:</td><td><input name="tema"></td></tr>  
<tr align="left"><td colspan="2"><textarea rows="15" cols="32" name="message">test</textarea></td></tr>  
<tr align="left"><td><INPUT TYPE="RADIO" NAME="radio" VALUE="plain" checked>plain</td><td><INPUT TYPE="RADIO" NAME="radio" VALUE="html">html</td></tr>  
 
<th><button>Send</button></th>  

</table>  
</form>  
<center><b>I am spamer :D</b></center> 
</body> 
<style type="text/css"> 
body{ 
background-color:#222222; 
color:#C1C1C1;  
font-family:Verdana; 
} 
a{ 
color:#B9B9BD; 
text-decoration:none; 
font-size:12px; 
} 
#kap{ 
font-size:30px; 
} 

b{ 
font-color:#D1EEEE; 
} 

button{ 
 border:1px solid #222222; 
background-color:#363636; 
font-size:19px; 
} 
  button:hover{ 
 border:1px solid #BCD2EE; 

 } 

h1{ 
text-align:center; 
} 

  
 input,textarea{ 
 border:1px solid #222222; 
background-color:#363636; 
font-size:15px; 
 } 
  
  input:hover{ 
 border:1px solid #BCD2EE; 

 } 
  
 textarea:hover 
 { 
 border:1px solid #BCD2EE; 
 } 
  
 table{ 
 border-color:#E6E6FA; 
 } 
 </style>