When I try to send mail using the PHP
<form action="tester.php" method="post">
FullName<input type="text" name='name'><br>
Email<input type="email" id="email-input" name='email-try'>
<button type="submit">Send</button>
<br/>
</form>
<?php
$to = $_POST['email-try'];
$name = $_POST['name'];
$subject = "My Email Trial";
$txt = "Hey my name is ".$name." and I'm trying to see if this will work";
$headers = "From: supporter@gmail.com";
mail($to,$subject,$txt,$headers);
header("location: type.html");
echo "Email Sent";
?>
script, it redirects well and shows me that it is sent but when i check my mail, i don't see it. I already hosted the site and checked the codes online but they don't work. Please what am I doing wrong