Hi, I've found several tutorials on how to do this, but it doesn't work. Here's my simple emailing code:
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$zone = $_POST['zone'];
$call_time = $_POST['call_time'];
$comment = $_POST['comment'];
$to = 'MY EMAIL';
$subject = '$name is interested in your product!';
$message = 'name = $name\nemail = $email\nphone = $phone\ntimezone = $zone\nbest time to call = $call_time\nmessage = $comment';
if(mail($to, $subject, $message))
{
echo "The information was successfully sent.";
}
else
{
echo "The information was NOT sent.";
}
?>
(Once I get it working I'll beef up the security)
So any ideas why this isn't working? I get the success message, but not the email.
Ok, so I guess I could have been more specific:
- I'm running Mac OS X
- I'm currently testing my site on MAMP (a local Apache, MySQL, and PHP server-thingy :D)
- Obviously I put a valid email in the "to" field.
- When I write the errors to a log file, I don't see any
I'm running Mac OS X