Record is inserting but email is not going..
$checkemail=mysql_num_rows(mysql_query("select * from authentications where email='".$_POST['email']."'"));
header("Location:".$_SERVER['PHP_SELF']."?msg=E-Mail Already Exists ");
$query="insert into authentications (password, authcode, email, status, created_at)
values ('".$_POST['password']."', '".md5($_POST['email'])."', '".$_POST['email']."', 0, '".date('Y-m-d h:i:s')."')";
$headers1 = 'MIME-Version: 1.0' . "\r\n";
$headers1 .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers1 .= "From: Delhi Certificates \r\n";
$headers1 .= "Organization: Delhi Certificates\r\n";
$Subject1 = "Your account has been registered. Thank you!";
You recently registered for Delhi Certificates using this email address. To complete your registration, follow the link below:
(If clicking on the link doesn't work, try copy and paste it into your browser.)
If you did not register for mobile9.com, please disregard this message.
// echo $msg;
// echo $to, $Subject1, $msg, $headers1;
$success = mail($to, $Subject1, $msg, $headers1);
// header("Location:".$_SERVER['PHP_SELF']."?msg=Email hass been sent ");
Windows or *nix? Local development, or production server? What is the value of $success ? Have you tried $to without adding the quotes? Have you tried to specify a valid from email address in the header?
Linux Environment and It is on production server..
If I use only mail function and use hard coded email in parameter then It works.
$success is not having any use..
$to = $_POST['email'];
Adding the quotes is likely invalidating the address.
Still it is not working I tried ..