Hi and thanks in advance for any help. I was using the following script (below) to process a form and send email. It worked fine but quit working last week. When I run it now I get the 'Error Sending Mail' message.
After a call to my web host, I learned they had upgraded the PHP version on that server. I think it is 4.4 but I am not sure. Can anyone tell me why this script would stop working?
==========
<?php
$message = "\r\nAttention: Steven \r\n" .
"The following person has sent an email \r\n \r\n" .
"Name: " . stripslashes(trim($POST['Name'])) . "\r\n" .
"E-mail: " . stripslashes(trim($POST['email'])) . "\r\n" .
"City: " . stripslashes(trim($POST['City'])) . "\r\n" .
"State: " . stripslashes(trim($POST['State'])) . "\r\n \r\n" .
"Subject: " . stripslashes(trim($POST['subject'])) . "\r\n" .
"Message: " . stripslashes(trim($POST['Message'])) . "\r\n \r\n" .
"Mailing List: " . $_POST['Mailinglist'] . "\r\n \r\n" .
"[end of information] \r\n";
$headers = 'From:' . $POST['email'] . "\r\n" . 'Reply-To:' . $POST['email'] . "\r\n" . 'X-Mailer: PHP/' . phpversion();
// send the email notification
$result = mail('steven.reule@doj.ca.gov',$_POST['subject'],$message,$headers);
if ($result){
echo ('Mail Sent');
} else { echo('Error Sending Mail'); }
?>
Thank you!
stevendude