timestamp in mail script

Greetings all, I’m hoping someone is able to help.

I have a mailscript for my ajax form, and all is working well. The only issue is that when mail is sent through the form, it shows as being about 6 hrs behind. From what I’ve read, this could be a time stamp issue (or lack of one), but I have no idea how to amend my script. I’ve found this snippet from a Google search, but again, don’t know how to apply it, and the timestamp is for CST : “Date: “.date(“D, j M Y H:i:s -0600”).”\r\n”);

The mail script I’m using is as follows:

<?php //we need to get our variables first $email_to = '[email protected]'; //the address to which the email will be sent $name = $_POST['name']; $email = $_POST['email']; $subject = $_POST['subject']; $message = $_POST['message']; /*the $header variable is for the additional headers in the mail function, we are asigning 2 values, first one is FROM and the second one is REPLY-TO. That way when we want to reply the email gmail(or yahoo or hotmail...) will know who are we replying to. */ $headers = "From: $email\r\n"; $headers .= "Reply-To: $email\r\n"; if(mail($email_to, $subject, $message, $headers)){ echo 'sent'; // we are sending this text to the ajax request telling it that the mail is sent.. }else{ echo 'failed';// ... or this one to tell it that it wasn't sent } ?>

Thank you in advance for any help!

Sponsor our Newsletter | Privacy Policy | Terms of Service