Cant seem to get an email through but I cant find any problems... Help much appreciated!
Code:<?php if (isset($_POST['submit'])){ //robot catch if(!empty($spam)){ exit; } //create best new line command depending on OS if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) { $eol = "\r\n"; } elseif (strtoupper(substr(PHP_OS, 0, 3) == 'MAC')) { $eol = "\r"; } else { $eol = "\n"; } //set variables $name = $_POST['name']; $email = $_POST['email']; $phone = $_POST['phone']; $subject = $_POST['subject']; $message = $_POST['message']; //email recipient $artsatheart = "Arts at Heart <email@gmail.com>, "; //set subject and message $subject = 'Arts at Heart - Email from '.$name.' regarding '.$subject; $msg = 'Name: ' .$name. $eol .'Email Address: ' .$email. $eol .'Phone Number: ' .$phone. $eol.'Message: ' .$message. $eol; //additional email information for servers $headers .= 'From: Arts at Heart <email@gmail.com>' . $eol; $headers .= 'Reply-To: ' . $name . ' <' .$email . '>' . $eol; $headers .= 'Return-Path: Arts at Heart <email@gmail.com>' . $eol; $headers .= "Message-ID:<" . date('M-d-y') . " support@" . $_SERVER['SERVER_NAME'] . ">" . $eol; $headers .= "X-Mailer: PHP v" . phpversion() . $eol; //mail email mail($artsatheart,$subject,$msg,$headers); header( 'Location: http://www.facebook.com/' ) ; exit(); }else{ header( 'Location: http://www.cnet.com/' ) ; exit(); } ?>HTML Code:<div id="contactForm"> <form method="post" action="submit.php"> <fieldset> <div id="contactLeft"> <label for="name">Name</label> <input id="contactInput" type="text" name="name" autofocus="autofocus" placeholder="Full Name" required="required"> <label for="email">E-mail</label> <input id="contactInput" type="email" name="email" placeholder="name@domain.com" required="required"> <label for="phone">Phone</label> <input id="contactInput" type="tel" name="phone" placeholder="ex. (555) 555-5555"> <label for="website">Subject</label> <input id="contactInput" type="text" name="subject" placeholder="What's on your mind?" required="required"> </div> <div id="contactRight"> <label for="message">Question/Comment</label> <textarea id="message" name="message" placeholder="What's up?" required="required"></textarea> <input id="" type="text" name="spam" placeholder="Spam Catcher"> <input id="submitButton" type="submit" name="submit"/> </div> </fieldset> </form> </div>


Reply With Quote




Bookmarks