Web contact form
Hi,
I have a created a webform and mailscript for that. Basically, it should send information in mail id. The problem I am facing is I don't get any emails though the script is correct. I am using this same script at 4 different places with different mail ids. Rest of the places it is working well but it is not working here.
Initially I thought there might be problem with the hosting server (some don't allow scripts) but this is hosted on godaddy.com & I talked to them, they allow mailscripts.
Please help me solving this problem. Here is the script.
/* subject & email variables */
$emailSubject = 'Mail from MyDubliGold.com';
$webMaster = 'admin@mydubligold.com';
/* Gathering data variables */
$field_name = $_POST['name'];
$field_email = $_POST['email'];
$field_zip = $_POST['zip'];
$field_num = $_POST['num'];
$field_num1 = $_POST['num1'];
$field_refer = $_POST['refer'];
$body = <<<EOD
Name: $name
Email: $email
Phone No.: $zip-$num-$num1
Person who referred you: $refer
EOD;
$headers = "From: $email\r\n";
$headers .= "content=type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body, $headers);
/* Results rendered as HTML */
$theResults = <<<EOD
<!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=utf-8" />
<title>Thank you!</title>
<meta http-equiv="refresh" content="0;url=http://www.mydubligold.com/moreinfo.html" />
<link href="CSS/css_new.css" rel="stylesheet" type="text/css" />
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
<body>
<div id="wrapper">
<div id="header">
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','800','height','171','src','FLash/curve_top','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','FLash/curve_top' ); //end AC code
</script>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="800" height="171">
<param name="movie" value="FLash/curve_top.swf" />
<param name="quality" value="high" />
<embed src="FLash/curve_top.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="800" height="171"></embed>
</object>
</noscript>
</div>
<div id="text">
<p> </p>
<p>Information sent successfully!</p>
<p> </p>
<p>"Thanks for spending time on our site. Please call the person who referred you and get all your questions answered on how to take advantage of this once in a life time opportunity." You will now be sent over to <a href="www.mydubligold.com/moreinfo.html">www.MyDubliGold.com</a></p>
<p>If you are not redirected within a couple of seconds, please click the above link.</p>
<p> </p>
<p> </p>
<p> </p>
</div>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>