HSD Posted June 29, 2010 Share Posted June 29, 2010 Ok new to php. And I have made these forms work before. The contact form will register my mailer.php page and gives a confirmation message, but doesn't send the email. I have checked the email address and it is correct. Feeling like I am missing something simple here. Please help thanks in advance.... <?php if(isset($_POST['submit'])) { $to = "[email protected]"; $subject = "Message For WSC"; $name_field = $_POST['name']; $email_field = $_POST['email']; $phone_field = $_POST['phone']; $message = $_POST['message']; $body = "From: $name_field\n E-Mail: $email_field\n Phone: $phone_field\n Message:\n $message"; echo "Thanks! Your email has been sent to us. We will be in contact soon."; mail($to, $subject, $body); } else { echo "There was an error. Please resubmit your email again. Thanks."; } ?> Link to comment https://forums.phpfreaks.com/topic/206181-trouble-with-contact-form/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.