电子邮件功能即使在更正代码后也无法正 我不知道为什么不发送emal

Following is my php code for email function which is not sending email and i am not getting where the mistake is. Form data is posting properly but mail is not going.

$imgSrc   = "logo1.png";
$bg = "background.jpg";
$subjectPara1 = "Dear admin";
$subjectPara2 = $_POST["message"];
$subjectPara4 = $_POST["email"];
$subject = $_POST["subject"];
$subjectPara3 = $_POST["author"];
$message = '<!DOCTYPE HTML><html>'.
'<head>'.
'<title>Email notification</title>'.
'</head>'.
'<body style="background-image: url('.$bg.');background-size: cover;">'.
'<div id="header" style="width: 80%;height: 60px;margin: 0 auto;padding: 10px;color: #fff;text-align: left;font-family: Open Sans,Arial,sans-serif;">'.
'<img height="50" width="220" style="border-width:0" src="'.$imgSrc.'" >'.
'</div>'.
'<div id="outer" style="width: 80%;margin: 0 auto;margin-top: 10px;">'. 
'<div id="inner" style="width: 78%;font-family: inherit;font-size: 15px;font-weight: normal;line-height: 1.4em;color: #fff;margin-top: 10px;">'.
'<p>'.$subjectPara1.'</p>'.
'<p>'.$subjectPara2.'</p>'.
'<p><br/>Regards,<br/>'.$subjectPara3.'</p>'.
'<p>'.$subjectPara4.'</p>'.
'</div>'.  
'</div>'.
'<div id="footer" style="width: 80%;height: 40px;text-align: center; padding: 10px; font-family: inherit; font-size: 15px; color: #fff;">'.
'All rights reserved @ 2016'.
'</div>'.
'</body></html>';    
$to      = 'test@exmple.com'; 
$from    = $subjectPara4;           
$headers  = 'From: test@exmple.com
';
$headers .= 'Reply-To:  test@exmple.com
';
$headers .= 'MIME-Version: 1.0
';
$headers .= 'Content-Type: text/html; charset=ISO-8859-1
';
if(mail($to, $subject, $message, $headers))
{
echo "<script>window.location='index.php';</script>";
}

Kindly help me to resolve this.