View Full Version : Web contact form

05-06-2009, 08:00 PM

I have a created a webform and mailscript for that. Basically, it should send information in mail id. The problem 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

$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">
<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>
<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','heigh t','171','src','FLash/curve_top','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movi e','FLash/curve_top' ); //end AC code
<object classid="clsid27CDB6E-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>
<div id="text">
<p>Information sent successfully!</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>
echo "$theResults";

05-06-2009, 08:09 PM
GoDaddy does allow you to use your own email send scripts,
BUT ... they only send to the email specified in the account setup.
It makes no difference what email you put in there ... it will only send to the account holder.

05-06-2009, 08:15 PM
Ok, can you please check this script. This is working everywhere but not on this contact form. The main form can be seen on www.mydubligold.com. Form field names & variable names have been checked a number of times but i am not able to catch the problem.

I know that the script is working because it is redirecting the page to correct address once the form is filled up & sent. The only thing is mails are vanishing in between. They are not getting posted at the mentioned address i.e. admin@mydubligold.com


05-06-2009, 08:53 PM
Somebody please help...This is very annoying. It is working everywhere but not on this server. Earlier were Linux servers & this is windows. Does it make any difference? I am trying to think in all possible directions.

05-06-2009, 08:55 PM
Do you own the GoDaddy account?
Go into your webhost account settings and tell us what email is typed in as the contact.
If it's not "admin@mydubligold.com" ... then that's your problem.

05-06-2009, 09:04 PM
Yes, the mail id on account is kp222222@aol.com (this is my client's mail id), initial when I uploaded the script, I used this e-mail id but the client said he is not receiving any mails. So I made admin@mydubligold.com (and forwarding incoming mails to kp222222@aol.com) but no success with that as well.

Godaddy should allow using admin@mydubligold.com as well in scripts as this is associated with the hosting domain. Anyways...solution matters in the end.

05-06-2009, 09:06 PM
And both of you have checked the "filtered" emails? (example, the bulk bin, or spam box)?
Maybe the emails are being sent, but not to the "in-box". Just a thought.

05-06-2009, 09:20 PM
Yes, I just had a conversation with my client and asked him to check spam mails. No success with that as well.

05-06-2009, 09:39 PM
I've run out of ideas ...
Gotta be a godaddy thing though, if it works on 3 other servers.