| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Registered User
Join Date: Nov 2007
Posts: 6
|
php email question
Hey, I have cobbled together some code to store peoples detailsd and send me an email with said deteils, but I'm not getting the email so here's the code, what am I doing wrong? (I've left our the password for obvious reasons <?php $firstName = strip_tags(trim($_POST['first_name'])); $lastName = strip_tags(trim($_POST['last_name'])); $email = strip_tags(trim($_POST['Email'])); $message = strip_tags(trim($_POST['Message'])); $db_name="jonbak0_db"; $db_username="jonbak0_db"; $db_server="mysql4.freehostia.com"; $db_password=""; $sql = "INSERT INTO emailSignup (firstName,lastName,email,message) VALUES ('$firstName','$lastName','$email','$message')"; mysql_query($sql); $to = "culturaldissection@hotmail.com"; $message = $_POST["Message"]; $messagesent = "From: $email Message: $message"; $from = $_POST["Email"]; $headers = "e-mail sign up from: $from"; mail($to,$messagesent,$headers); echo "Your details have been sent, thank you."; ?> |
|
|
|
|
|
#2 (permalink) |
|
shiro
Join Date: Aug 2007
Location: Yokohama, Japan
Posts: 2,606
|
mail sent using php's mail() function is often filtered by mail server's junk mail filters. I have had the same problem with hotmail previously. Try using phpmailer. It's a free class that you can download, and they have a good tutorial on their site on how to use it. It has solved the problem for me. |
|
![]() |