May
receive a blank email via mailform..
To preface a bit, i’ve been searching for many hours and was almost sure someone out there would have the same issue as me but It looks like all the results are regarding people not getting the emails at all, or not getting their redirect page to work, etc. etc.
My issue is that I have a site with a contact page (your basic name, phone number, email fields), upon hitting the submit button it goes to my redirect (thanks for submitting) page, and I receive the actual email, however its completely blank..utterly and completely blank. As if I sent you an email with a subject, and left the body with nothing in it and hit send. Im not sure if i need to modify my contact page code, or the gdform.asp, or both….thats where i need help
I use Godaddy as the host, and am using their GDFORM.ASP file, and the email addy the emails go to is the one I have with godaddy as well, so it all seemed pretty cut and dry, im just having the hardest time finding out why its blank. I can read code pretty well (html, css, sql, and bits of JS and asp) so im not a complete newbie at all this, at least I think im not
. As of now I have not modified the gdform.asp file at all, just left it exactly how godaddy gave it to me on my root. Im pretty sure i need modify it somehow to match up with the fields I have on my actual site’s contact page, but am confused as to where it goes. If someone can guide me in the right direction as to maybe an example line of code i need to input, I can prob take it from there.
Im supplying both the contact page code, along with the godaddy gdform.asp file as well, exactly as they are on my server now. Any help is GREATLY appreciated and many thanks in advance!!
contact page code (starting at the form header)
*****************************
<form action="gdform.asp" method="post" name="form" id="form" style="size:auto; margin:0px; padding:0px; ">
<input type="hidden" name="subject" value="Form Submission" />
<input type="hidden" name="recipients" value="admin@*****.net">
<input type="hidden" name="redirect" value="submission.html" />
<table width="365" border="0" cellspacing="0" cellpadding="0" style="margin:16 0 0 17px ">
<tr>
<td valign="top" width="186">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" height="24"><input type="text" value="first name: "></td>
</tr>
<tr>
<td valign="top" height="24"><input type="text" value="last name: "></td>
</tr>
<tr>
<td valign="top" height="24"><input type="text" value="e-mail: "></td>
</tr>
<tr>
<td valign="top"><input type="text" value="telephone: "></td>
</tr>
<TR>
</tr>
</table> </td>
<td valign="top"><textarea cols="10" rows="5">your message: </textarea><br>
<br style="line-height:2px "><a href="#" style="font-weight:bold; color:#121212; text-decoration:none; margin:0 0 0 94px" onClick="document.getElementById(’form’).reset()"> clear</a><img src="http://www.webmaster-talk.com/images/arrow1.gif" alt="" style="margin-left:3px "><a href="submission.html" style="font-weight:bold; color:#121212; text-decoration:none; margin:0 0 0 11px" onClick="document.getElementById(’form’).submit()" >send</a><img src="http://www.webmaster-talk.com/images/arrow1.gif" alt="" style="margin-left:3px "></td>
</tr>
</table>
</form>
***********************************************
gdform.asp file
***********************************************
<%
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
%>
Relevant Links

