I have received a lot of emails on the go daddy form mail issue. I have written an example to post for everyone that should help you out in a little more detail. This is a very raw form but it has been tested and it does work.
Below you will find an example of a very basic form for an estimate. This form will collect the data and post to a page called start_thanksN.asp. So you will need to start out by creating a blank HTML page (or whatever language you decide to use). You will enter your form data and post the data to your processing page. For this example I am posting mine to start_thanksN.asp.
<html>
<head>
<title>Example for submit using ASP and Cdont</title>
</head>
<body>
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td width="94%" valign="top">
<form name="form1" method="post" action="start_thanksN.asp" onSubmit="return checkForm()">
<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">
<table width="60%" border="0" align="center" cellpadding="2" cellspacing="0">
<tr valign="top">
<td width="27%" nowrap><div align="right"><font size="2">Name:</font></div></td>
<td width="73%"><div align="left"><input name="txtName" type="text" id="txtName12" size="30"></div></td>
</tr>
<tr valign="top">
<td nowrap><div align="right"><font size="2">Address:</font></div></td>
<td><div align="left"> <input name="txtAddress" type="text" id="txtAddress2" size="30"></div></td>
</tr>
<tr valign="top">
<td nowrap><div align="right"><font size="2">City:</font></div></td>
<td><div align="left"><input name="txtCity" type="text" id="txtCity2" size="30"></div></td>
</tr>
<tr valign="top">
<td nowrap><div align="right"><font size="2">State:</font></div></td>
<td><div align="left"><input name="txtState" type="text" id="txtState2" size="30"></div></td>
</tr>
<tr valign="top">
<td nowrap><div align="right"><font size="2">Zip:</font></div></td>
<td><div align="left"><input name="txtZip" type="text" id="txtZip2" size="15"></div></td>
</tr>
<tr valign="top">
<td nowrap><div align="right"><font size="2">Phone:</font></div></td>
<td><div align="left"><input name="txtPhone1" type="text" id="txtPhone12" size="30"></div></td>
</tr>
<tr valign="top">
<td nowrap><div align="right"><font size="2">Alternate Phone:</font></div></td>
<td><div align="left"><input name="txtPhone2" type="text" id="txtPhone22" size="30"></div></td>
</tr>
<tr valign="top">
<td nowrap><div align="right"><font size="2">Best Time to Call:</font></div></td>
<td><div align="left"><font size="2"><input name="chkMorning" type="checkbox" id="chkMorning" value="Morning">Morning
<input name="chkAfternoon" type="checkbox" id="chkAfternoon" value="Afternoon">Afternoon <br>
<input name="chkEvening" type="checkbox" id="chkEvening" value="Evening">Evening
<input name="chkAny" type="checkbox" id="chkAny" value="Any Time">Any Time </font></div></td>
</tr>
<tr valign="top">
<td nowrap><div align="right"><font size="2">Email Address:</font></div></td>
<td> <div align="left"><input name="txtEmail" type="text" id="txtEmail" size="30"></div></td>
</tr>
<tr valign="top">
<td nowrap><div align="right"><font size="2">Service Type:</font></div></td>
<td nowrap><div align="left"><input name="chkDesign" type="checkbox" id="chkDesign" value="Design">
<font size="2">Design</font><font size="2">
<input name="chkNet" type="checkbox" id="chkNet" value="Net">
. Net<br>
<input name="chkColdFusion" type="checkbox" id="chkColdFusion" value="ColdFusion">
ColdFusion
<input name="chkPHP" type="checkbox" id="chkPHP" value="PHP">
PHP <br>
<input name="chkFlex" type="checkbox" id="chkFlex" value="Flex">
Flex<br>
<input name="chkASP" type="checkbox" id="chkASP" value="ASP">
ASP
<br>
<input name="chkDev" type="checkbox" id="chkDev" value="Development">
Development<br>
</font></div></td>
</tr>
<tr valign="top">
<td nowrap><div align="right"><font size="2">Current Site URL:</font></div></td>
<td><div align="left"><input name="txtURL" type="text" id="txtURL" size="45">
</div></td>
</tr>
<tr valign="top">
<td nowrap><div align="right"><font size="2">Message:</font></div></td>
<td><div align="left"><textarea name="txtMessage" cols="30" rows="4" id="txtMessage"></textarea></div></td>
</tr>
</table>
<div align="center"><br><input type="submit" name="Submit" value="Submit"><br></div>
</form>
</td>
</tr>
</table>
</body>
</html>
Now that we have our form created we need to post our form to our processing page. You will need to create a blank .ASP page. The page should be the same name as your post in your form tag in your html page. This is where we will place all of our CDONTs code and post a confirmation that the email was sent.
<%@ LANGUAGE = VBScript %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Thank you
</title> <%
Dim theName
theName = request(
"txtName")
Dim theAddress
theAddress = request(
"txtAddress")
Dim theCity
theCity = request(
"txtCity")
Dim theState
theState = request(
"txtState")
Dim theZip
theZip = request(
"txtZip")
Dim thePhoneNum
thePhoneNum = request(
"txtPhone1")
Dim thePhoneNum2
thePhoneNum2 = request(
"txtPhone2")
Dim callTimeMorning
callTimeMorning = request(
"chkMorning")
Dim callTimeAfternoon
callTimeAfternoon = request(
"chkAfternoon")
Dim callTimeEvening
callTimeEvening = request(
"chkEvening")
Dim callTimeAny
callTimeAny = request(
"chkAny")
Dim theEmail
theEmail = request(
"txtEmail")
Dim serviceDesign
serviceDesign = request(
"chkDesign")
Dim serviceNet
serviceNet = request(
"chkNet")
Dim serviceColdFusion
serviceColdFusion = request(
"chkColdFusion")
Dim serviceFlex
serviceFlex = request(
"chkFlex")
Dim serviceRaking
serviceRaking = request(
"chkRaking")
Dim serviceASP
serviceASP = request(
"chkASP")
Dim servicePHP
servicePHP = request(
"chkPHP")
Dim serviceDev
serviceDev = request(
"chkDev")
Dim siteURL
siteURL = request(
"txtURL")
Dim theMessage
theMessage = request(
"txtMessage")
if not theName =
"" then
'sends email to myself
Set myMail=CreateObject(
"CDO.Message")
myMail.Subject=
"Testing CDO form mail by Nicole Rutter" myMail.From=theEmail
myMail.To=
"nicole@cfwebtools.com" BodyText =
"*********** Request For Estimate ***************" &chr(
13) &chr(
10)
BodyText = BodyText &
"Name: " & theName &chr(
13) &chr(
10) &
"Address: " & theAddress &chr(
13) &chr(
10) &
"City: " & theCity &chr(
13) &chr(
10) &
"State: " & theState &chr(
13) &chr(
10) +
"Zip Code: " & theZip &chr(
13) &chr(
10)
BodyText = BodyText &
"Phone Number: " & thePhoneNum &chr(
13) &chr(
10) &
"Alternate Phone Number: " & thePhoneNum2 &chr(
13) &chr(
10) &
"Best Time to Call: " & callTimeMorning &
" " & callTimeAfternoon &
" " & callTimeEvening &
" " & callTimeAny &chr(
13) &chr(
10)&
"Email Address: " & theEmail &chr(
13) &chr(
10) &chr(
13) &chr(
10) &
"Services Requested: " &chr(
13) &chr(
10)
Dim ServiceRequest
if not serviceDesign =
"" then
ServiceRequest = serviceDesign &chr(
13) &chr(
10)
end if
if not serviceNet =
"" then
ServiceRequest = ServiceRequest + serviceNet &chr(
13) &chr(
10)
end if
if not serviceColdFusion =
"" then
ServiceRequest = ServiceRequest + serviceColdFusion &chr(
13) &chr(
10)
end if
if not serviceFlex =
"" then
ServiceRequest = ServiceRequest + serviceFlex &chr(
13) &chr(
10)
end if
if not serviceRaking =
"" then
ServiceRequest = ServiceRequest + serviceRaking &chr(
13) &chr(
10)
end if
if not serviceASP =
"" then
ServiceRequest = ServiceRequest + serviceASP &chr(
13) &chr(
10)
end if
if not servicePHP =
"" then
ServiceRequest = ServiceRequest + servicePHP &chr(
13) &chr(
10)
end if
if not serviceDev =
"" then
ServiceRequest = ServiceRequest + serviceDev &chr(
13) &chr(
10)
end if
BodyText = BodyText & ServiceRequest &chr(
13) &chr(
10) & URL:
" & siteURL & " URL
" &chr(13) &chr(10) &chr(13) &chr(10)
BodyText = BodyText & "Message:
" & theMessage &chr(13) &chr(10)
myMail.TextBody=BodyText
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
'Name or IP of remote SMTP server
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") _
="relay-hosting.secureserver.net
"
'Server port
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _
=25
myMail.Configuration.Fields.Update
myMail.Send
set myMail=nothing
end if
%>
</head>
<body>
<table width="807" border="0" align="center" cellpadding="p" cellspacing="0">
<tr>
<td width="622" valign="top" bgcolor="#FFFFFF"> The form has been sent thank you.
<br> <br></td> </tr> </table>
I hope this will give everyone a little better understanding of how to get your form mail working on go daddy. If your wondering how the email will look to you here is an example below
*********** Request For Estimate ***************
Name: Nicole Rutter
Address: 11124 my street
City: Omaha
State: Nebraska
Zip Code: 68154
Phone Number: 402-222-2222
Alternate Phone Number: 402-111-1111
Best Time to Call: Morning
Email Address:
nicole@cfwebtools.com Services Requested:
Flex
Website URL: nicole.cfwebtools.com
Message: Reqesting some information for a flex project
Happy coding!
Thanks again! I truly appreciate it =)
I'm not sure if you are a VB programmer (neither am I) but I'm trying to modify a code segment to relay mail thru my go-daddy email account rather that using gmail. I've modified the code below and tried port 80 and 3535 but it stops at the .send cmd. Any help would be appreciated:
My Code
iConf.Load -1 ' CDO Source Defaults
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/smt...") = True
.Item("http://schemas.microsoft.com/cdo/configuration/smt...") = 1
'.Item("http://schemas.microsoft.com/cdo/configuration/sen...") = "mygmail@gmail.com"
'.Item("http://schemas.microsoft.com/cdo/configuration/sen...") = "mypassword"
'.Item("http://schemas.microsoft.com/cdo/configuration/smt...") = "smtp.gmail.com"
'.Item("http://schemas.microsoft.com/cdo/configuration/sen...") = 2
'.Item("http://schemas.microsoft.com/cdo/configuration/smt...port" target="_blank">http://schemas.microsoft.com/cdo/configuration/smt...") = 465
.Item("http://schemas.microsoft.com/cdo/configuration/sen...") = "myuser@mygodaddy.com"
.Item("http://schemas.microsoft.com/cdo/configuration/sen...") = "mypassword"
.Item("http://schemas.microsoft.com/cdo/configuration/smt...") = "smtpout.secureserver.net"
'.Item("http://schemas.microsoft.com/cdo/configuration/smt...") = "relay-hosting.secureserver.net"
'.Item("http://schemas.microsoft.com/cdo/configuration/sen...") = 2
'.Item("http://schemas.microsoft.com/cdo/configuration/smt...port" target="_blank">http://schemas.microsoft.com/cdo/configuration/smt...") = 3535
.Item("http://schemas.microsoft.com/cdo/configuration/smt...port" target="_blank">http://schemas.microsoft.com/cdo/configuration/smt...") = 80
.Update
End With
My code stops on the send command
Set iMsg = CreateObject("CDO.Message")
With iMsg
Set .Configuration = iConf
.To = Email
.CC = ""
.BCC = ""
.From = """blah blah""<myuser@mygodaddy.com>"
.Subject = subj
.AddAttachment Attm
.TextBody = Msg
.Send
End With
Set iMsg = Nothing
your messages have been discarded by our mail servers as non compatible with RFC. The messages have blank CC field (so, CC field presents, but it's blank).
and here is the code:
<%
form_from = "info@realitytravelguide.com"
form_to = "info@realitytravelguide.com"
form_cc = Request.Form("mail_cc")
form_bcc = Request.Form("mail_bcc")
form_subject = "Reality Form Submission"
form_importance = 1
FOR x = 1 TO Request.Form.Count
IF Request.Form.Key(x) = "mail_from" OR Request.Form.Key(x) = "mail_to" OR Request.Form.Key(x) = "mail_cc" OR Request.Form.Key(x) = "mail_bcc" OR Request.Form.Key(x) = "mail_subject" OR Request.Form.Key(x) = "mail_importance" OR Request.Form.Key(x) = "mail_redirect" OR Request.Form.Key(x) = "mail_send" OR Request.Form.Key(x) = "Submit" THEN
form_variables = form_variables
ELSE
form_variables = form_variables & Request.Form.Key(x) & ": " & vbcrlf & Request.Form.Item(x) & vbcrlf & vbcrlf
END IF
NEXT
DIM body_text
body_text = vbcrlf & "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" & vbcrlf
body_text = body_text & form_subject & vbcrlf
body_text = body_text & "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" & vbcrlf & vbcrlf
body_text = body_text & form_variables
body_text = body_text & "Sent from: " & vbcrlf & Request.ServerVariables("HTTP_REFERER") & vbcrlf & vbcrlf
body_text = body_text & "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" & vbcrlf
<!--SET objMail = Server.CreateObject("CDONTS.NewMail")-->
SET objMail = CreateObject("CDO.Message")
<!--objMail.BodyFormat = 1-->
<!--objMail.MailFormat = 1-->
objMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sen...")=2
objMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smt...") _
="127.0.0.1"
objMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smt...port" target="_blank">http://schemas.microsoft.com/cdo/configuration/smt...") _
=25
objMail.Configuration.Fields.Update
objMail.From = form_from
objMail.To = form_to
objMail.CC = form_cc
objMail.BCC = form_bcc
objMail.Subject = form_subject
<!--objMail.Importance = form_importance-->
objMail.TextBody = body_text
objMail.Send
SET objMail = NOTHING
Response.Write("")
%>
Can you please helm me where i am making it wrong?
In other words, you might be missing e-mail and not even know it because your AOL user got an error.
I built my site using M.S. web developer express 2008 using aspx pages and one of those pages is a reservation form which I need emailed to me.
As I couldn't get the code working within the aspx pages I created two pages exactly as you presented them above, only substituting my email address for:
"YOUR EMAIL ADDRESS" in the the form
and
myMail.To in the start_thanksN.asp
It seems no matter what I do, every time I click on the submit button I get the following error:
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
I know this is a long shot, but do you have any idea what resource is missing?
Thnaks for your help