I've just built a website for my company and have placed it on a server. It's working perfectly. The website contains a form page that collects request from staff. The form sends the information to the database. I placed code there for it to send a mail to my inbox so that I can be notified after a staff member fills the form. Unfortunately, the mail doesn't get to me. Please I need help on how to go about it.
I am using XAMPP at my back end. Below is the code that involves the mail part:
<?php
$to = "seyioyedeji31@yahoo.com";
$subject = "Test mail";
$message = "<html>
<head>
<title>MIS HELP SUCCESSFUL</title>
</head>
<body>
<p>Here are the query details:</p>
<p><table border=1 style= background:#0B0B61>
<tr><td> SENDER: $_POST[fullname]</td></tr>
<tr><td> DEPARTMENT: $_POST[department]</td></tr>
<tr><td> NATURE OF PROBLEM: $_POST[nature]</td></tr>
<tr><td> DETAILS: $_POST[mail]<td></tr>
</table></p>
</body>
</html>";
$from = "seyioyedeji@mis.com";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>