my current php mail cannot be send out (no error, all can run well, but only cannot send out notificant email), and my code as attached.
if (isset($_POST["normal"])) { // check if normal leave form was submitted
$insert = "INSERT INTO leave_applications (type, date_from, date_to, reason, days, submitted_on, notice, status, users_id)
VALUES ('$type', '$ifrom', '$ito' , '$reason1' ,'$days', '$date', 'normal', 'Pending', '$id')";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$headers .= "From:" . "[email protected]". "\r\n";
$headers .= "Cc: [email protected]" . "\r\n";
$message = '<p><strong>This is strong text</strong> while this is not.</p>';
$admin = "[email protected]";
$applicant = "[email protected]";
$subject = "Tomato Portal: New Leave Submission";
mail($admin,$subject,$message,$headers);
} else {
$insert = "INSERT INTO leave_applications (type, date_from, date_to, days, submitted_on, notice, status, users_id)
VALUES ('$type', '$ifrom', '$ito' ,'$days', '$date', 'short', 'Pending', '$id')";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$headers .= "From:" . "[email protected]". "\r\n";
$headers .= "Cc: [email protected]" . "\r\n";
$message = '<p><strong>This is strong text</strong> while this is not.</p>';
$admin = "[email protected]";
$applicant = "[email protected]";
$subject = "Tomato Portal: New Leave Submission";
mail($admin,$subject,$message,$headers);
}
Please someone help to reach me out,k thanks