PHP mail() function
Posted: Sun Oct 03, 2010 5:20 pm
I just talked to my web host to make sure PHP was set up to send mail and it was. However, I get no errors. but I never get the email that should be sent when user fills out form. (the email address is stored in the $email variable).
Any ideas?
Thanks!
Any ideas?
Thanks!
Code: Select all
<?
$headers .= 'To: $email' . "\r\n";
$headers .= "From: <admin@mypage.com>" . "\r\n";
$to = $_POST['email'];
$subject = "email confirmation";
$message = "This email is to advise you that you have successfully been
registered . under $username and
$password from this email address. If you did not register or if this
is an error, there is no need to respond to this email." ;
$sent=mail($to, $subject, $message, $headers);
?>
[ /syntax]
All variables were set from previous script. Thanks again!
?>