Excuse me, I am learning to build a simple contact form on my customed website. I want to send an email via mail() but no mails are received. How do I set it via Sendmail path?
<?php
if (isset($_POST['email'])) {
//Email information
$to="admin@example.com";
$subject='New Form Submission';
$name=$_POST['name'];
$email=$_POST['email'];
$phone=$_POST['phone'];
$message=$_POST['message'];
//send email
mail($to,$subject,$message);
header('Location:success.html');
}
?>