I am using ubuntu with xampp. I need to send mail from localhost . I am new to php.Can u help me what are all i need to configure to send mail from localhost?
<?php
$to = "mymail@gmail.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "othemail@gmail.com";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers) or die("unable to send");
echo "Mail Sent.";
?>