Hi,
I have the following email processing script which works perfectly on one website I have. However I have tried to copy it onto another site and it no longer works. I have included the insert page, it is only the email term I am looking to send but whatever I try it work sending anything.
Could there be a setting on my server which could allow one site to work but stop one script from working?
<?php
$EmailFrom = ".com - Contact Us";
$EmailTo = "email@yahoo.com";
$Subject = ".com Contact Form";
$Name = Trim(stripslashes($_POST['Name']));
$Tel = Trim(stripslashes($_POST['Tel']));
$Email = Trim(stripslashes($_POST['Email']));
$Message = Trim(stripslashes($_POST['Message']));
// validation
$validationOK=true;
if (!$validationOK) {
print "<meta http-equiv=\\"refresh\\" content=\\"0;URL=error.htm\\">";
exit;
}
// prepare email body text
$Body = "";
$Body .= "Name: ";
$Body .= $Name;
$Body .= "\
";
$Body .= "Tel: ";
$Body .= $Tel;
$Body .= "\
";
$Body .= "Email: ";
$Body .= $Email;
$Body .= "\
";
$Body .= "Message: ";
$Body .= $Message;
$Body .= "\
";
// send email
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
// redirect to success page
if ($success){
print "<meta http-equiv=\\"refresh\\" content=\\"0;URL=contactthanks.php\\">";
}
else{
print "<meta http-equiv=\\"refresh\\" content=\\"0;URL=error.htm\\">";
}
?>
<div class="articleemailsignup">
<div id="contact-area">
<form name="loginForm" method="post" action="/siteinfo/contactengine.php">
<ul >
<div id="contactareabox">
<div id="contactareatitle">Newsletter Signup:</div>
<div id="contactareacell">
<input type="text" name="Email" id="Email" /></text>
</div>
</div>
</div>
<div class="contactusbutton">
<div class="user-area">
<input type="submit" value="Submit" class="submit-button" />
</div>
</div>
</ul>
</form>
</div>