I can't figure out why any emails sent from this script end up in the hotmail junk folder. Can anyone help me?
<?php
if ($submit)
{
$time = time();
if ($time - $_COOKIE['time'] <= 30)
{
echo "You can't send another email that soon";
exit;
}
$data = $_POST['data'];
$data['sender'] = "From: " . $data['sender'];
mail($data[to], $data[subject], $data[message], $data[sender]);
setcookie("time", $time);
echo "Email Sent to: $data[to] from $data[sender]<br>";
} else
{
showform();
}
function showform() {
echo "<form name='emailstuff' method='post'>
Email to recieve: <input type='text' name='data[to]'><br>\n
Sender Email: <input type='text' name='data[sender]'><br>\n
Subject: <input type='text' name='data[subject]'><br>\n
Message: <textarea rows='20' cols='100' name='data[message]'></textarea><br>\n
<input type='submit' name='submit' value='Send'>
</form>";
}
?>
I set this thing up to test my php emailing functions within other scripts and I just don't see why only hotmail puts it in junk folder