PHP Mail ()

Soldato
Joined
30 Apr 2007
Posts
3,095
Location
Kent
Hi Guys

I'm using this PHP email script...

Code:
<?php 
$name =    $_POST ['name'];
$email =   $_POST ['email'];
$subject = $_POST ['subject'];
$message = $_POST ['message'];

$to = "-EMAIL ADDRESS-";
$re = $subject;
$headers = 'From: '.$email.'' . "\r\n" . 
'Reply-To: '.$email.'' . "\r\n" . 
'X-Mailer: PHP/' . phpversion(); 

if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $email)) { 
Echo "Your email has failed our validation checks. If you are a genuine user please email your order to <b>-EMAIL ADDRESS-</b> and include in your email, that your email address was blocked. Thank You.";
} 
else {
mail ($to, $re, $message, $headers);
echo "Your email has been sent. Thank you for your email, we will deal with your email shortly.";
}
?>

But something I have just noticed, is when an email is received any apostrophes (') have a forward slash (/) in front of them, how can i stop this?

Thanks

-EMAIL ADDRESS- follows standard email address format, just removed as it could be classed as promoting businesses.
 
Back
Top Bottom