Old 24-05-2008, 03:22   #1 (permalink)
aslanandbeez
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.";
?>
  Reply With Quote
Old 24-05-2008, 03:43   #2 (permalink)
Shiro
shiro
 
Shiro's Avatar
 
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.
__________________
This space for rent.

Dads Japan
Dudes Japan
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8