I wrote a simple test code for mail in PHP on my remote server RHEL 8. But when I trigger it doesn't sent mails to me. What is the issue can anyone tell me? Is there any configuration I need to do in php.ini file?
CODE
<?PHP
// the message
$msg = "First line of text\nSecond line of text";
// use wordwrap() if lines are longer than 70 characters
$msg = wordwrap($msg,70);
// send email
mail("sudipta.s@gmail.com","My subject",$msg);
?>
I'm using PHP 7.2, RHEL 8, apache 2.4. Any clue to solve it?