I am trying to send a basic confirmation email after a user submits my html form using the php mail() function, but for some reason the email won't send. Here is my code:
<?php
echo "You're all set! You should be recieving a confirmation email within the next few minutes.";
$to = $_POST["email"];
$subject = "Your Appointment";
$msg = "Your appointment has been scheduled for " . $_POST["ApptDate"] . ".";
mail($to,$subject,$msg);
?>
I know my form is working correctly, because I am taken to this page after I submit the form. Also, "email" and "ApptDate" are keys I stored in my html form, and when I echo the variables they all print, so I don't think its a variable related error. Any help would be greatly appreciated.