?
Solved

Mail form in go daddy

Posted on 2007-10-13
7
Medium Priority
?
2,420 Views
Last Modified: 2008-01-09
Can anyone help me with how to make an e-mail form work in go-daddy? I currently have fields created on the page and they allow me to inpu the text.  When I submitt the form it does get e-mailed where it is supposed to go but the data I entered does not show up in the e-mail, just the field names.  Can someone help?

Jeff

0
Comment
Question by:jeffreychorba
  • 3
  • 3
7 Comments
 
LVL 14

Expert Comment

by:bugs021997
ID: 20071202
@jeffreychorba,

Post the code so we can check
0
 

Author Comment

by:jeffreychorba
ID: 20071381
<html>

<head>
<title>Kreco Antennas - Contact Us</title>

<STYLE TYPE="text/css">
<!--
A:link { text-decoration: none;
color: #666666;
font-family: Verdana; }
A:visited { text-decoration: none;
color: #666666;
font-family: Verdana; }
A:active {text-decoration: none;
color: #666666;
font-family: Verdana; }
A:hover {text-decoration: underline;
color: #222222;
font-family: Verdana; }
.style2 {
      font-family: Georgia, "Times New Roman", Times, serif;
      font-style: italic;
      font-weight: bold;
}
.style3 {font-family: Georgia, "Times New Roman", Times, serif}
.style4 {font-size: xx-large}
.style5 {color: #FFFFFF}
.style8 {font-family: Georgia, "Times New Roman", Times, serif; font-weight: bold; }
.style10 {
      font-size: medium;
      color: #FFFFFF;
      font-family: Verdana, Arial, Helvetica, sans-serif;
}
.style11 {font-size: small; color: #FFFFFF; font-family: Verdana, Arial, Helvetica, sans-serif; }
.style13 {color: #FFFFFF; font-family: Verdana, Arial, Helvetica, sans-serif; }
-->
</STYLE>

</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<table align="center" bgcolor="#4D5D6D" width="770" border="0" cellspacing="0" cellpadding="0" height="100%">
      <tr>
            <td height=75 colspan="7" valign=top>
            
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                        <td height=50><div align="center" class="style2 style4"><font color="#FFFFFF">Kreco Antennas </font></div></td>
                  </tr>
            </table>
            
            </td>
      </tr>
      <tr>
        <td width=160 height="16" valign="top" background="images/side.gif">&nbsp;</td>
        <td width="160" height="16" valign="top" background="images/button1.jpg"><div align="center" class="style8"><a href="index.htm"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Home</font></a></div></td>
        <td width="160" height="16" valign="top" background="images/button1.jpg"><div align="center" class="style3"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="catalog.htm" target="_self"><strong>Catalog</strong></a> </font></div></td>
        <td width="160" height="16" valign="top" background="images/button1.jpg"><div align="center" class="style8"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Contact Us </font></div></td>
         <td width=160 height="16" valign="top" background="images/side.gif">&nbsp;</td>
      </tr>
      <tr>
            <td height=3 colspan="7"></td>
      </tr>
      <tr>
            <td height="150" colspan="7"><div align="center"><img src="images/index.jpg" width="780" height="150"></div></td>
      </tr>
      <tr>
            <td height="200" colspan="7">
            
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="32%" height="222" valign="top"><div align="center"><em><font color="#FFFFFF" size="6" face="Verdana, Arial, Helvetica, sans-serif"><br>
                  Contact Us </font></em></div></td>
                        <td width="68%" valign=top><div align="justify">
                        <p>&nbsp;</p>
                        <p><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif">
                      </font></p>
                        <table width="100%" border="0">
                  <tr>
                    <td width="24%"><p align="left" class="style10">Address:</p></td>
                    <td width="76%"><p class="style11">27 Spruce Cabin Road<br>
                      Cresco, PA 18326</p>
                    </td>
                  </tr>
                  <tr>
                    <td><p align="left" class="style10">Email:</p></td>
                    <td><p class="style13">name@emailaddress.com</p></td>
                  </tr>
                  <tr>
                    <td><p align="left" class="style10">Phone:</p></td>
                    <td><p class="style11">(570) 595-2212</p></td>
                  </tr>
                  <tr>
                    <td class="style10"><p align="left">Fax:</p></td>
                    <td><span class="style11">(570) 595-2024</span></td>
                  </tr>
                  <tr>
                    <td><br></td>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="90" colspan="2" nowrap><p class="style10">                      Please fill out this form and we will<br>
                      get back to you shortly:<br>
                    </p></td>
                  </tr>
                  <tr>
<form action="gdform.asp" method="post">
<input type="hidden" name="subject" value="Antenna info request" />
<input type="hidden" name="redirect" value="contact.htm" />
<p>First Name:<input type="text" name="FirstName" /></p>
<p>Last Name:<input type="text" name="LastName" /></p>
<p>Company:<input type="text" name="Company" /></p>
<p>Address:<input type="text" name="Address" /></p>
<p>City:<input type="text" name="City" /></p>
<p>State:<input type="text" name="State" /></p>
<p>Zip:<input type="text" name="Zip" /></p>
<p>E-Mail Address:<input type="text" name="email" /></p>
<p>Phone Number:<input type="text" name="Phone Number" /></p>
<p>Fax Number:<input type="text" name="Fax Number" /></p>


<p>Your question or comment:<textarea name="comments" cols="40" rows="10">
Type comments here.</textarea></p>
<input type="submit" name="submit" value="submit"/>
</form>

      <tr>
            <td height="29" colspan="7"><div align="center"><img src="images/bottom.jpg" width="780" height="29" border="0"></div></td>
      </tr>
      <tr>
            <td height="48" colspan="7"><div align="center"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Copyright 2004 KrecoAntennas.com<br>
        Site Created By: </font><span class="style5"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Technical Computer Services </font></span><font size="1" face="Verdana, Arial, Helvetica, sans-serif"></font><font size="1" face="Verdana, Arial, Helvetica, sans-serif"></font></div></td>
      </tr>
</table>


</body>
</html>
0
 
LVL 20

Expert Comment

by:Gawai
ID: 20071409
whats the contents of gdform.asp ?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:jeffreychorba
ID: 20071786
<%

Dim landing_page, host_url
Dim fso, outfile, filename, dirname, myFolder
Dim req_method, key, value
Dim bErr, errStr, bEmpty
On Error resume next
bErr = false
bEmpty = true
errStr = ""
Set fso = Server.CreateObject("Scripting.FileSystemObject")
host_url = Request.ServerVariables("HTTP_HOST")
req_method = Request.ServerVariables("REQUEST_METHOD")
dtNow = Now()
filename = Server.MapPath("\ssfm")
dirname = filename
filename = filename & "\gdform_" & DatePart("M", dtNow) & DatePart("D", dtNow) & DatePart("YYYY", dtNow) & DatePart("N", dtNow) & DatePart("S", dtNow)

Function FormatVariableLine(byval var_name, byVal var_value)
      Dim tmpStr
      tmpStr = tmpStr & "<GDFORM_VARIABLE NAME=" & var_name & " START>" & vbCRLF
      tmpStr = tmpStr & var_value & vbCRLF
      tmpStr = tmpStr & "<GDFORM_VARIABLE NAME=" & var_name & " END>"
      FormatVariableLine = tmpStr
end function

Sub OutputLine(byVal line)
   outfile.WriteLine(line)
end sub

if err.number = 0 then
      Set outfile = fso.CreateTextFile(filename, true, false)
      if err.number <> 0 then
                  bErr = true
                  errStr = "Error creating file! Directory may not be writable or may not exist.<br>Unable to process request."
      else
            if(req_method = "GET") then
                  for each Item in request.QueryString
                        if item <> "" then
                              bEmpty = false
                              key = item
                              value = Request.QueryString(item)
                              if(lcase(key) = "redirect") then
                                    landing_page = value
                              else
                                    line = FormatVariableLine(key, value)
                                    Call OutputLine(line)
                              end if
                        end if      
                  next
            elseif (req_method = "POST") then
                  for each Item in request.form
                        if item <> "" then
                              bEmpty = false
                              key = item
                              value = Request.form(item)
                              if(lcase(key) = "redirect") then
                                    landing_page = value
                              else
                                    line = FormatVariableLine(key, value)
                                    Call OutputLine(line)
                              end if
                        end if      
                  next
            end if
            outfile.close
      end if      
      if(bEmpty = true) AND errStr = "" then
            bErr = true
            errStr = errStr & "<br>No variables sent to form! Unable to process request."
      end if
      if(bErr = false) then      
            if (landing_page <> "") then
                  response.Redirect "http://" & host_url & "/" & landing_page
            else
                  response.Redirect "http://" & host_url      
            end if
      else
            Response.Write errStr
      end if      
      set fso = nothing
else
  Response.Write " An Error Occurred creating mail message. Unable to process form request at this time."
end if
%>
0
 
LVL 14

Accepted Solution

by:
bugs021997 earned 2000 total points
ID: 20071800
I have tried to host on go daddy and the form works perfect with a couple minor imperfections to fix your code but in your form you do need to tell it where to send it...

<form action="gdform.asp" method="post">
<input type="hidden" name="recipients" value="YOUR EMAIL ADDRESS">
<input type="hidden" name="subject" value="Form Submission">
<input type="hidden" name="redirect" value="thankyou.html">
</form>

now it knows where to send the email. works great!


Also instead of using GOdaddy's mail try using below...

http://www.paulsadowski.com/WSH/cdo.htm
http://www.assonetriver.com/snippets/cdo.asp
0
 
LVL 14

Expert Comment

by:bugs021997
ID: 20071801
0
 

Author Comment

by:jeffreychorba
ID: 20072533
Hi Bugs,

It does work good.  Is there a way to have it show the fields in the e-mail so they are not sorted in alphabetical order? ie (address is at the top)

Thanks,

Jeff
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…
Suggested Courses
Course of the Month16 days, 23 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question