hi,
I creating an application whereby I am generating a password and then mailing it to the user.
I have been trying the mailto function but the mail is not sent to the recipient. Here's my code:
$to="chitra@yahoo.com";
$subject = "New Password";
$email = $_REQUEST['mail'] ;
$message = "Your 8 character password is: $password" ;
$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";
}
I am not getting any error. It just says that the email was sent sent successfully, but it actually doesnot. Please help.