i'm trying to send email from localhost using php, but failed the code like this
<?php
$to= "fahmie.art98@gmail.com";
$subject = "this is test";
$messages= "this is message test, congrats, your success"
if( mail($to, $subject, $messages) ) {
echo "success guys";
}
else{
echo "failed guys";
};
?>
how to solve the problems? i'm using linux. and how to configure my XAMPP to send an email on localhost?