PDA

View Full Version : Send e-Mail Help


SDP2006
06-22-2003, 01:06 AM
How could I make this send an email to me with a message. For instance, when I use this, where I have the "$message = "$sendermessage";" There is nothing in the body of the email. How do I make it write the "$message = "$sendermessage";" write in the body of the email?


<?php
$senderemail = $_POST['email'];
$sendermessage = $_POST['name'];
$recipient = "test@example.com";
$subject = "Your subject line goes here";
$mailheader = "From: $senderemail\n";
$mailheader .= "Reply-To: $senderemail\n\n";
$message = "$sendermessage";
mail($recipient, $subject, $message, $mailheader) or die ("Failure");
?>



Thanks ;)

Steven_Smith
06-22-2003, 03:39 AM
Check to make sure that "$sendermessage" has data in it. echo $sendermessage

try changing

mail($recipient,_$subject,_$message,_$mailheader)_or_die_("Failure");

to

mail($recipient,_$subject,_$sendermessage,_$mailheader)_or_die_("Failure");

Steve