Contact form not working from free template : <p>I got this free template but the contact form is not working at all. It says the message was sent but I don't receive any email. The form looks really nice that's why I don't want to change it but it's not working. The developer does not provide technical help for free templates. Please help me and thank you in advance!</p>

<p>HTML</p>

<pre><code>        &lt;form id="main-contact-form" name="contact-form" role="form" method="post" action="sendemail.php"&gt;
                        &lt;div class="form_status" style="display: none;"&gt;&lt;p class="text-success"&gt;Thank you for contacting us. We'll get back to you shortly.&lt;/p&gt;&lt;/div&gt;
                            &lt;div class="form-group"&gt;
                                &lt;input type="text" name="name" class="form-control" placeholder="Name" required&gt;
                            &lt;/div&gt;
                            &lt;div class="form-group"&gt;
                                &lt;input type="email" name="email" class="form-control" placeholder="Email" required&gt;
                            &lt;/div&gt;
                            &lt;div class="form-group"&gt;
                                &lt;input type="text" name="subject" class="form-control" placeholder="Subject" required&gt;
                            &lt;/div&gt;
                            &lt;div class="form-group"&gt;
                                &lt;textarea name="message" class="form-control" rows="8" placeholder="Message" required&gt;&lt;/textarea&gt;
                            &lt;/div&gt;
                            &lt;button type="submit" class="btn btn-primary"&gt;Send Message&lt;/button&gt;
                        &lt;/form&gt;
</code></pre>

<p>PHP</p>

<pre><code>&lt;?php
$name       = @trim(stripslashes($_POST['name'])); 
$from       = @trim(stripslashes($_POST['email'])); 
$subject    = @trim(stripslashes($_POST['subject'])); 
$message    = @trim(stripslashes($_POST['message'])); 
$to         = 'nikita_lim@rocketmail.com';//replace with your email

$headers   = array();
$headers[] = "MIME-Version: 1.0";
$headers[] = "Content-type: text/plain; charset=iso-8859-1";
$headers[] = "From: {$name} &lt;{$from}&gt;";
$headers[] = "Reply-To: &lt;{$from}&gt;";
$headers[] = "Subject: {$subject}";
$headers[] = "X-Mailer: PHP/".phpversion();

mail($to, $subject, $message, $headers);

die;
</code></pre>

<p>JS</p>

<pre><code>var form = $('#main-contact-form');
form.submit(function(event){
    event.preventDefault();
    var form_status = $('&lt;div class="form_status"&gt;&lt;/div&gt;');
    $.ajax({
        url: $(this).attr('action'),
        url: '../sendemail.php',
        //type : $(this).attr('method'),
        //data : $(this).serialize(),

        beforeSend: function(){
            form.prepend( form_status.html('&lt;p&gt;&lt;i class="fa fa-spinner fa-spin"&gt;&lt;/i&gt; Email is sending...&lt;/p&gt;').fadeIn() );
        }
    }).done(function(data){
        form_status.html('&lt;p class="text-success"&gt;Thank you for contacting us. We will get back to you shortly&lt;/p&gt;').delay(3000).fadeOut();
    });
});
</code></pre>
