Problem with PHP email handler
Posted: Sun Mar 30, 2014 7:56 am
Hi All,
This was working and I never changed anything and now all of a sudden its not working. Here is my PHP:
when i submit the form I get a result=Successful back, but I never get the email, and like I said it was working a few weeks ago and I didn't change anything??
And I'm receiving emails from elsewhere so I know my email is working.... Any Ideas?
This was working and I never changed anything and now all of a sudden its not working. Here is my PHP:
Code: Select all
<?php
$emailTo = "d.sparrow@cox.net";
$name = $_POST["name"];
$company = $_POST["company"];
$phone = $_POST["phone"];
$emailFrom = $_POST["email"];
$message = $_POST["message"];
$subject = "New message from Too Neat Studios";
if( !empty( $_POST ) ) {
$body = "Name: " . $name . "\n\n";
$body .= "Company: " . $company . "\n\n";
$body .= "Phone: " . $phone . "\n\n";
$body .= "Email: " . $emailFrom . "\n\n";
$body .= "Message:\n" . $message;
$body = wordwrap($body, 70);
$header = "From: " . $emailFrom . "\nReply-To: " . $emailFrom. "\n\n";
if( mail( $emailTo, $subject, $body, $header ) ) {
echo( "result=Successful" );
} else {
echo( "result=Unsuccessful" );
}
}
?>And I'm receiving emails from elsewhere so I know my email is working.... Any Ideas?