Im having trouble getting this form to work on my website. It all seems to work ok, however when i test it, i dont recieve any emails to my inbox. Godaddy seems to think that I am connecting to their server in the correct manner, but say that they cannot advise on customers codeing issues. I thought that somebody in this forum maybe able to give me some pointers?
[<?php
ini_set('sendmail_from', 'user@domain.tld');
ini_set('SMTP', 'relay-hosting.secureserver.net');
$subject = $_POST["subject"];
$message = $_POST["message"];
$from = $_POST["from"];
$name = $_POST["name"];
$phone = $_POST["phone"];
$verif_box = $_POST["verif_box"];
$subject = stripslashes($subject);
$message = stripslashes($message);
$from = stripslashes($from);
$name = stripslashes($name);
$phone = stripslashes($phone);
$embody = "$name $phone $message";
if(md5($verif_box).'a4xn' == $_COOKIE['tntcon']){
mail("ed@treework.net", 'Online Form: '.$subject, $_SERVER['REMOTE_ADDR'].$embody, "From: $from");
setcookie('tntcon','');
} else if(isset($message) and $message!=""){
header("Location:".$_SERVER['HTTP_REFERER']."?subject=$subject&from=$from&message=$message&wrong_code=true");
exit;
} else {
echo "no variables received, this page cannot be accessed directly";
exit;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>E-Mail Sent</title>
<style type="text/css">
<!--
body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
-->
</style></head>
<body>
Email sent. Thank you.<br />
<br />
Return to <a href="/">home page</a> ?
</body>
</html>]