
January 24th, 2013, 04:01 AM
|
|
|
|
Php email help
Hi
I have a sign up form and want the sign up form to send a email to the user who has just signed up
I have the following in my sign up form page
PHP Code:
<?php
$to = "$emailadd";
$subject = "Registration Information";
$emailadd = $_REQUEST['emailadd'];
$password = $_REQUEST['password'];
$message = $_REQUEST['message'];
$headers =
"Email Address: $emailadd
Password: $password";
$sent = mail($to, $subject, $message, $headers);
if($sent) {print "Your mail was sent successfully"; }
else {print "We encountered an error sending your mail"; }
?>
But am getting the following error
We encountered an error sending your mail
Any ideas where I am going wrong
|