PHP mail function send mail but did not received in inbox


PHP mail function send email successfully but I did not recieved in inbox. This file is on server

this is my code

$to = ‘’;
$subject = ‘Testing’;
$message = ‘hello’;
$headers = ‘From:’ . "\r
" .
‘Reply-To:’ . "\r
" .
‘X-Mailer: PHP/’ . phpversion();

if(mail($to, $subject, $message, $headers))
echo “success”;
echo “fail”;

gave me message “success”;

“Success” means “I had enough information to send this email to the mail daemon.”. It does not mean the email was actually SENT.

Standard response to this is “Try using
instead of \r
.” (or you could use the PHP_EOL constant)

Maybe the problem is with the mail server. The php mail() function just sends data to a mail server that should send the email.
Try $headers with only From:

$headers = 'From:';

MarPlo I have tried with that too but did not work…