Ruggly Posted August 3, 2007 Share Posted August 3, 2007 Here's my form: <form name="contact" method="post" action="email.php" id="form"> <div align="left">Name: <INPUT TYPE="text" NAME="name" SIZE="40"> <br> <br> Phone: <input type="text" name="phone" size="39"> <br> <br> E-mail: <INPUT TYPE="text" NAME="email" SIZE="40"> <br> <br> How can we help you: <SELECT NAME="need" SIZE="1"> <OPTION SELECTED>Choose One... <OPTION>Want to sell my home <OPTION>Want to buy a home <OPTION>Loan Information <OPTION>Credit Repair <OPTION>Help! I'm in Foreclosure! <OPTION>Other (see comments) </SELECT> <br> <br> Please list the cities you are interested in:<br> <textarea name="cities" rows=4 cols=50></textarea> <br> Comments:<br> <textarea name="comments" rows=4 cols=50></textarea> <br> <INPUT TYPE="submit" name="esubmit" value="Send" style="cursor:pointer"> <INPUT TYPE="reset" value="Clear"> </div> </form> Here's my php process: <script type="text/javascript"> <!-- function delayer(){ window.location = "http://www.hr-realestate.info" } //--> </script> </head> <body onLoad="setTimeout('delayer()', 5000)"> <?php //Some variables $mymail = "mymail@hotmail.com"; $name = $_POST['name']; $phone = $_POST['phone']; $email = $_POST['email']; $need = $_POST['need']; $cities = $_POST['cities']; $comments = $_POST['comments']; //Mail Processing if ($_POST['esubmit']) { $body = "Name: " . $name; $body .= "\nEmail: " . $email; $body .= "\nPhone: " . $phone; $body .= "\nCities: " . $cities; $body .= "\n\n" . $comments; mail($mymail,$need,$body,"From: $name <$email>"); echo "<p>Thank you! Someone will contact you shortly. <br><br>"; echo "You will be redirected back to our homepage in a few seconds."; echo "</p>"; } ?> </body> Does the code look right? I'm not getting any emails with this Quote Link to comment https://forums.phpfreaks.com/topic/63221-php-email-what-am-i-doing-wrong/ Share on other sites More sharing options...
premiso Posted August 3, 2007 Share Posted August 3, 2007 Hotmail tends to mark mail coming from servers as spam/junk. Check that also look into mail headers www.php.net/mail in the mail function. Quote Link to comment https://forums.phpfreaks.com/topic/63221-php-email-what-am-i-doing-wrong/#findComment-315088 Share on other sites More sharing options...
Ruggly Posted August 3, 2007 Author Share Posted August 3, 2007 It works for another page that I've made. When I copied that code to this page, it doesn't work. I have noticed that they come in the junk folder occasionally for the other page I made, but this page doesn't work at all Quote Link to comment https://forums.phpfreaks.com/topic/63221-php-email-what-am-i-doing-wrong/#findComment-315095 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.