I know this question has been asked many times but after going through all of them i am still not able to send mails from localhost. I have tried configuring my php.ini and sendmail.ini files but it still doesn't work. I tried using smtp server ports 587 and 465 but none seem to work.
I have attached the screenshot of my .ini files. Please Help!
here is my php code :
<?php
$from="From: jain.ayusch10@gmail.com";
if(mail("gaganjain901@gmail.com", "Test Mail","THIS IS A TEST MAIL",$from)){
echo "success";
}else{
echo "faliure";
}
?>