Hi I am using the the mail function in php to send emails but the emails in the inbox of the receiver show the name as "unknown sender" in gmail and going in spam in yahoo, here is the code for the function.
function send_email1($from, $fromaddress, $to, $sub, $mes)
{
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/plain; charset=utf-8\r\n";
$headers .= "To: ".$to." <".$to.">\r\n";
$headers .= "From: ".$from." <".$from.">\r\n";
$headers .= "Reply-To: ".$from." <".$from.">\r\n";
$headers .= "Return-Path: ".$from." <".$from.">\r\n";
mail($to, $sub, $mes, $headers);
return mail($to, $sub, $mes, $headers); ;
}