Lambneck Posted June 10, 2009 Share Posted June 10, 2009 I have a contact form that worked perfectly for a few months and then one day just stopped functioning. I was receiving mail through it and then it all of a sudden stopped. I didnt even notice it until recently when I tested it myself and nothing happened. I filled out the form and sent the message by did not receive the message in my mail box. Does anyone know what might have happened? I heard about mail form hijacking before but if that was the case wouldn't I receive the spam mail along with everyone else on the spam list? I don't get it. ??? Heres the form processor script Im using: <?php // Mail header removal function remove_headers($string) { $headers = array( "/to\:/i", "/from\:/i", "/bcc\:/i", "/cc\:/i", "/Content\-Transfer\-Encoding\:/i", "/Content\-Type\:/i", "/Mime\-Version\:/i" ); if (preg_replace($headers, '', $string) == $string) { return $string; } else { die('Spam much?'); } } // Build the email (replace the address in the $to section with your own) $to = '[email protected]'; $subject = "New message: $subject"; $message = "$name said: $message"; $headers = "From: $email"; // field validation if ($subject=="" || $message=="" || $name=="") { print ("All form fields are required. Please go back and try again."); } else { // email validation if(!eregi('^([._a-z0-9-]+[._a-z0-9-]*)@(([a-z0-9-]+\.)*([a-z0-9-]+)(\.[a-z]{2,3})?)$', $email)) { print ("Your email address does not appear to be valid. Please go back and try again."); exit; } // Send the mail using PHPs mail() function mail($to, $subject, $message, $headers); // Redirect header('Location: ../thanks.php'); } ?> Link to comment https://forums.phpfreaks.com/topic/161646-solved-mail-form-issue/ Share on other sites More sharing options...
trq Posted June 10, 2009 Share Posted June 10, 2009 Have you tried checking your mail servers logs? Link to comment https://forums.phpfreaks.com/topic/161646-solved-mail-form-issue/#findComment-852943 Share on other sites More sharing options...
Lambneck Posted June 10, 2009 Author Share Posted June 10, 2009 What do you mean by mail servers logs? I use horde and I checked my inboxes and nothing there except for the emails from when the form did work. Link to comment https://forums.phpfreaks.com/topic/161646-solved-mail-form-issue/#findComment-853063 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.