I have a simple contact form, and it could send email before my WP installation. The site didn't used to be a WP site.
The contact form is on the contact page, and the action of the form is set to ../send_email.
I get a 404 error when I get to the send_email page, but only if the script checks or tries to get anything from the $_POST array. I need help, because I can't go to sleep until I get this working, and it's 2:21AM!
I have this on page.php:
if(is_page('send_email') && !empty($_POST))
{
$to = 'myemail@email.com';
$from = (empty($_POST['email']))? 'myemail@email.com':$_POST['email'];
$message = (!isset($_POST['message']))? 'Request For More Information':$_POST['message'];
$headers = "From: $from\r\n";
$headers .= "Reply-To: $from\r\n";
$headers .= "Return-Path: $from\r\n";
$headers .= "X-Mailer: PHP mail on mydomain.com\r\n";
$message = "
Name: {$_POST['name']}
Phone: {$_POST['phone']}
Email: {$_POST['email']}
$message
";
$success = mail($to,'Contact From Website',$message,$headers);
}