sendmail


#1

Hi all, I haven’t been using PHP for long and I am trying to set up a sendmail php file. Problem is it sends ok and the subject line is there but the message seems to be missing. I’ve checked the input names on my form and they are right. Can someone tell me if my php is correct as I am unsure.

<?php

$name = $_GET['name'];
$email = $_GET['email'];
mail("me@anemail.com", "Website Enquiry Form", $name, $email);
print "Congratulations your email has been sent";

?>

any help appreciated …


#2

You have you attributes messed up:
http://nl2.php.net/manual/en/function.mail.php

You’re sending the contents of $name as the message and the contents of $email as additional headers.