Problem - PHP-sending data to my mail id

Hi Friends,

I did one contact.php and process.php(also i attached txt file). This process.php file send the data to my yahoo mail id.

But i didnt receive any mails from this page. I dont know what i did the mistaken.

so pls kindly send me you suggestion or feedback. waiting for your valuable suggestion.

process.php


<?php
if(isset($_POST['submit'])) {
   $to = 'vjn_23@yahoo.co.in';     //put your email address on which you want to receive the information
   $subject = 'hello';   //set the subject of email.
   
   $headers = 'MIME-Version: 1.0' . "\\r\
".
			'Content-type: text/html; charset=utf-8' . "\\r\
".
			'From: [email]me@example.com[/email]' . "\\r\
" .
			'Reply-To: [email]me@example.com[/email]' . "\\r\
" .
			'X-Mailer: PHP/' . phpversion();
   
   $message = "<table><tr><td>Your Name</td><td>".$_POST['name']."</td></tr>
               <tr><td>E-Mail</td><td>".$_POST['email']."</td></tr>
               <tr><td>Contact No</td><td>".$_POST['contact']."</td></tr>
               <tr><td>Message</td><td>".$_POST['message']."</td>
               </tr></table>" ;
			   
   mail($to, $subject, $message, $headers);
   header('Location: contact.php');
}
?>

Thank U,
Vjn_23

Change

<?php
    mail($to, $subject, $message, $headers);
    header('Location: contact.php');

to

<?php
    if (!mail($to, $subject, $message, $headers)){
        die('Something went wrong, the mail couldn\\'t be sent');
    } else {
        header('Location: contact.php');
    }

and see what happens. Also try changing the me@example.com emails as a real reply email needs to be used when sending mail