this is the part of my code that uses the mail() function. some reason it takes a whole day for anything to actually arrive at the mail box. i can email the address prefect from outlook, or whatever. is this a server issue, or is mail that slow? or is it something in my code...
- Code: Select all
$to = 'email@example.com';
$subject = $_POST['subject'];
$message = $_POST['message'];
$headers = 'From: ' . $_POST['email'] . "\r\n" .
'Reply-To: ' . $_POST['email'] . "\r\n" .
'X-Mailer: PHP/' . phpversion();
if (mail($to, $subject, $message, $headers))
$success = "Email succesfully sent!";
$error = "Error! Email failed to send!";