splace
02-11-2004, 02:49 AM
I am having some issues where I have a simple PHP form mail, which I will post up here, that works, however when I fill out the form and send it, everything goes through fine except it does not display the 'From' properly. It spits out 'nobody' in the from field. In adidtion, if i add the variable with the header declerations in it...$extra = "From: $Name\r\nReply-To: $Email\r\n"; for example, it will go through, but I will never recieve an email.
mail(blahblahblah,$extra);
This is what the mail would look like.
Thoughts?
PHP CODE
<?
//Contents of form in free_session.htm
$first_name=$_POST['First_Name'];
$last_name=$_POST['Last_Name'];
$phone_01=$_POST['Phone_01'];
$phone_02=$_POST['Phone_02'];
$phone_03=$_POST['Phone_03'];
$email=$_POST['Email'];
$goals=$_POST['Goals'];
$recipient = "steven.place@lucidapple.com";
$subject = "Free 45 Minuite Coaching Session Request";
$message = "Name: " . $first_name . " " . $last_name . "\n"
. "Phone: " . $phone_01 . "-" . $phone_02 . "-" . $phone_03 . "\n"
. "Email: " . $email . "\n"
. "Goals: " . $goals;
$from = "User requesting a free 45 minuite consultation. \n";
mail($recipient,$subject, $message, $from, $email);
header("Location: php/sent.php");
?>
-Steve
mail(blahblahblah,$extra);
This is what the mail would look like.
Thoughts?
PHP CODE
<?
//Contents of form in free_session.htm
$first_name=$_POST['First_Name'];
$last_name=$_POST['Last_Name'];
$phone_01=$_POST['Phone_01'];
$phone_02=$_POST['Phone_02'];
$phone_03=$_POST['Phone_03'];
$email=$_POST['Email'];
$goals=$_POST['Goals'];
$recipient = "steven.place@lucidapple.com";
$subject = "Free 45 Minuite Coaching Session Request";
$message = "Name: " . $first_name . " " . $last_name . "\n"
. "Phone: " . $phone_01 . "-" . $phone_02 . "-" . $phone_03 . "\n"
. "Email: " . $email . "\n"
. "Goals: " . $goals;
$from = "User requesting a free 45 minuite consultation. \n";
mail($recipient,$subject, $message, $from, $email);
header("Location: php/sent.php");
?>
-Steve