php mail
Posted: Sun Feb 15, 2009 12:10 pm
iam trying to send the infrmation from a form to email . I used the following code. but i is not working. could some ne help me with this. I appreciate your help.
Code: Select all
<?php
$to = "you@yoursite.com";
$subject = "Contact Us";
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
$headers = "From: $email";
$sent = mail($to, $subject, $message, $headers) ;
if($sent)
{print "Your mail was sent successfully"; }
else
{print "We encountered an error sending your mail"; }
?>