This question already has an answer here:
<?php
$to = "karthik.hansi@infysky.com";
$subject = "First php test script";
$message = "Hi This message is for leave application ";
$headers = "From:karthik.hansi@infysky.com";
if(mail($to, $subject, $message, $headers))
{
echo "failed";
}else{
echo "sent";
}
?>
This is My code I have tried this sending mail from PHP not able to send mail anything I have to configure in xampp.
</div>