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
Any ideas?
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Testing CDO form mail by Nicole Rutter"
myMail.From=theEmail
myMail.To="nicole@cfwebtools.com"
myMail.Bcc="nicole@cfwebtools.com,nikki32@gmail.com"
I have tested the code using a gmail account that goes through just fine. I haven't tested on hotmail. Has anyone else experienced this problem using a hotmail account??
Lo and behold, I think that was the problem!
#(-2147220975) The message could not be sent to the SMTP server. The transport error code was 0x800ccc6f. The server response was 554 The message was rejected because it contains prohibited virus or spam content
Oh GoDaddy, how I hate thee, let me count the ways...
http://www.bloombit.com/Articles/2008/05/ASCII-Enc...
Looks like I've got a new problem to fix now!
I would like to have two different forms on the site, but I can't get any of them to work.
Would you be willing to look at the site, try out the form, and look at the code? Maybe you'll see what I'm doing wrong!
http://www.infinitymassagecenter.com/contact.html
LMAO...so simple...
THANK YOU!!!!!!!
I'll have a look at your forms...
email me....my email is
apricot
_
Michelle
@
hotmail
I put it like that to protect my email :)
Great glad I could help! I believe Denille's code is now working. We exchanged emails back and forth.
-Nicole
U saved my day
:)
You're the best!
Cheers,
Michael
I googled for other people with godaddy mail issues and came across your email. Looked at your code and compared it with my own asp script only to find that it's perfectly similiar to yours.
Have you ever found that Godaddy's service can be very intermittent and only work when it wants to?
I'm getting frustrated. From one hour to the next, it will work and then abruptly just stop working.
All GoDaddy can say to me is "Your code is a third party script for which we do not provide support for" and I mean, seriously, it works.
Any thoughts?
Microsoft VBScript compilation error '800a0400'
Expected statement
/formreply.asp, line 91
BodyText = BodyText & ServiceRequest &chr(13) &chr(10) & URL: " & siteURL & " URL" &chr(13) &chr(10) &chr(13) &chr(10)
--------------------------------------------------------------^
I have a number of sites using forms in subsidiary directories on an unlimited hosting plan with godaddy and since the transition from easycgi where they were on individual hosting plans I have been struggling to get these working.
Many thanks,
Dave Reed
BodyText = BodyText & ServiceRequest &chr(13) &chr(10) & "URL: " & siteURL & " URL" &chr(13) &chr(10) &chr(13) &chr(10)
I would like to build a shrine for u
this was giving me a headache for so long, not because I lacked any necessary programming skills, but I just couldn't get the proper info from godaddy regarding the necessary parameters I needed to make the code run properly
again, thank u
THIS IS WHAT I'M GETTING WHEN I HIT "SEND":
virgoartdistrict.com-Form submission from virgoartdistrict.com?
From: formmailer@secureserver.net
Sent: Sat 3/14/09 1:04 PM
To: orangeart1@hotmail.com
-----------------------------------------------------------------This e-mail was generated from a form submission on your website: virgoartdistrict.com at 3/14/2009 10:04:04 AM
Thanks so much for this info it save me hours of frustration. You are the only one out of 70 blogs that helped with this.
Your form works perfectly and im able to adapt for our site.
Michael
A while back I implemented your form example to our website and since then I have redesigned the website and I am at the feedback form again ( i will think positive about learning how to do this better). Everything works fine except when I hit submit it displays:
CDO.Message.1 error '8004020d'
At least one of the From or Sender fields is required, and neither was found.
/feedback_form.asp, line 105
//this is what I have in the .asp file:
myMail.Configuration.Fields.Update (this is 105)
myMail.Send
set myMail=nothing
You are awesome!
Thank You it works well.....
:)
Glad I could help. I know its frustrating!
Nikki
I like your security image feature for the form, I am having problems with forms going through godaddy, looks like robots send random junk all the time, could you point me to a good source for the security image feature? I appreciate it. I tried to setup using CAPTCHA but doesnt worl right, if it fails, it sends email with data anyway... Thanks
Anyway, i copied your code and made some adjustments but I get an error when I try to post. the error is:
error '80040211'
/aspform/start_thanksN.asp, line 105
the line is: myMail.Send
any ideas?
like if i change the line to myMail.From="test@test.com" then it will send the email to test but not what the person actually put in.
:)
1) The FROM address must equal your domain name. (i.e. If my site's domain is xyz.com then I must send it from brian@xyz.com; NOT brian@abc.com).
2) The FROM, TO, CC, and BCC values must not share the same domain name. Using my example in #1 above, I cannot send that same email to myself (i.e the TO, CC, and BCC fields cannot be brian@xyz.com).
Hope that helps.
The site http://www.queentorrent.com you can download for free a lot of interesting movies.
As you probably know, GoDaddy has outgoing mail restrictions for sbcglobal.net, hotmail, etc. Those addresses can’t be put into a form. I get Error 800402e line 48 and 500 Internal Server Error.
When I talk to godaddy they say I have to have something like this:
// language -- C#
// import namespace
using System.Web.Mail;
private void SendEmail()
{
const string SERVER = "relay-hosting.secureserver.net";
MailMessage oMail = new System.Web.Mail.MailMessage();
oMail.From = "emailaddress@domainname";
oMail.To = "emailaddress@domainname";
oMail.Subject = "Test email subject";
oMail.BodyFormat = MailFormat.Html; // enumeration
oMail.Priority = MailPriority.High; // enumeration
oMail.Body = "Sent at: " + DateTime.Now;
SmtpMail.SmtpServer = SERVER;
SmtpMail.Send(oMail);
oMail = null; // free up resources
I am not a coder and am very confused. This seems like a completely different coding language than the ASP I am using. By any chance do you know how I can make the below form work? I would really appreciate your help. I have this form on several websites, but this one is http://www.waterfowloutfittersunlimited.com/guest....
Thanks,
Leslie
<%
If Not Request.Form("nospam") = "nospam" Then
Response.Redirect "http://www.waterfowloutfittersunlimited.com/error...."
End If
%>
<%
For Field = 1 to Request.Form.Count - 3
FieldName = Replace(Request.Form.Key(Field),"_"," ")
FieldValue = Request.Form.Item(Field)
Body = Body & FieldName & ": " & FieldValue & VbCrLf
Next
'Dimension variables
Dim objCDOSYSCon
'Create the e-mail server object
Set objCDOSYSMail = Server.CreateObject("CDO.Message")
Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
'Set and update fields properties
With objCDOSYSCon
'Outgoing SMTP server
.Fields("http://schemas.microsoft.com/cdo/configuration/smt...")="relay-hosting.secureserver.net"
.Fields("http://schemas.microsoft.com/cdo/configuration/smt...port" target="_blank">http://schemas.microsoft.com/cdo/configuration/smt...") = 25
'CDO Port
.Fields("http://schemas.microsoft.com/cdo/configuration/sen...") = 2
'Timeout
.Fields("http://schemas.microsoft.com/cdo/configuration/smt...") = 60
.Fields.Update
End With
'Update the CDOSYS Configuration
Set objCDOSYSMail.Configuration = objCDOSYSCon
'Set and update email properties
With objCDOSYSMail
'0=Low, 1=Normal, 2=High
.Fields("urn:schemas:httpmail:importance").Value = 1
'Who the e-mail is from
.From = Request.Form("email")
'Who the e-mail is sent to
.To = "lesliel@flash.net"
'Who the e-mail is CC'd to
'.Cc = ""
'The subject of the e-mail
.Subject = Request.Form("email_subject")
'Set the e-mail body format (HTMLBody=HTML TextBody=Plain)
.TextBody = Body
.Fields.Update
'Send the e-mail
.Send
End With
'Close the server mail object
Set objCDOSYSMail = Nothing
Set objCDOSYSCon = Nothing
'Rederect after sending email
Response.Redirect Request.Form("redirect_to")
%>
Other than that, if your form is still not working, make sure you set the relay server as "relay-hosting.secureserver.net".....
My Contact Us form HTML...
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ContactUs.aspx.cs" Inherits="CovertConsulting.ContactUs" %>
<%@ Register TagPrefix="CovertConsulting" TagName="Header" Src="_Header.ascx" %>
<%@ Register TagPrefix="CovertConsulting" TagName="Menu" Src="_Menu.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitiona...">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Covert Consulting Contact Us</title>
<meta name="keywords" content="consulting, programming, .NET, Silverlight, Microsoft programming, web development, computer programming,
computer consulting, PDA, PDA Development, Tampabay, Tampa Bay, Clearwater, St. Petersburg, PDA programming, Windows Mobile,
Windows Mobile development, Windows Mobile programming, software contracting, computer contracting, Kirk Covert, Molokan"/>
<meta name="description" content="Computer consulting and programming services"/>
<meta name="author" content="Kirk Covert"/>
<meta name="robots" content="ALL"/>
<link rel="stylesheet" type="text/css" href="CovertConsulting.css"/>
<style type="text/css">
.style1
{
width: 146px;
}
</style>
</head>
<body class="Body">
<form id="frmContactUs" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tr>
<td colspan="2">
<CovertConsulting:Header ID="Header" runat="server" />
</td>
</tr>
<tr>
<td valign="top" colspan="1" class="style1">
<CovertConsulting:Menu id="Menu" runat="server" width="145" />
</td>
<td align="left" valign="top" width="*" style="width: 747px" >
<table align="left" cellspacing="0" cellpadding="0" border="0" style="width: 100%; height: 71px" >
<tr valign="top">
<td style="height: 15px">
<br/>
<img alt="" align="left" width="24" src="images/1x1.gif" />
<table cellspacing="0" cellpadding="0" width="100%" height="20">
<tr>
<td class="HomeHead">
<asp:Label id="WelcomeMsg" runat="server">Look Forward To Hearing From You !</asp:Label>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div>
<asp:Label id="lblDunnMess" runat="server" style="z-index: 100; left: 199px; position: absolute; top: 280px">Use this form to contact us, report website problems, make website suggestions, or for other general communications.</asp:Label>
<asp:Label id="Label1" runat="server" Font-Bold="True" style="z-index: 101; left: 210px; position: absolute; top: 336px">From:</asp:Label>
<asp:TextBox id="txtFrom" runat="server" Width="192px" style="z-index: 102; left: 265px; position: absolute; top: 333px"></asp:TextBox>
<asp:RequiredFieldValidator id="rfvFrom" runat="server" ErrorMessage="RequiredFieldValidator" ControlToValidate="txtFrom" style="z-index: 103; left: 468px; position: absolute; top: 336px" Width="130px">* Name is required</asp:RequiredFieldValidator>
<asp:Label id="Label2" runat="server" Font-Bold="True" style="z-index: 104; left: 207px; position: absolute; top: 378px">Email:</asp:Label>
<asp:TextBox id="txtEmail" runat="server" Width="192px" style="z-index: 105; left: 264px; position: absolute; top: 376px"></asp:TextBox>
<asp:RequiredFieldValidator id="rfvEmail" runat="server" ErrorMessage="RequiredFieldValidator" ControlToValidate="txtEmail" style="z-index: 106; left: 472px; position: absolute; top: 380px" Width="201px">* Your email address is required</asp:RequiredFieldValidator>
<asp:Label id="Label3" runat="server" Font-Bold="True" style="z-index: 107; left: 195px; position: absolute; top: 417px">Subject:</asp:Label>
<asp:TextBox id="txtSubject" runat="server" Width="304px" style="z-index: 108; left: 263px; position: absolute; top: 416px"></asp:TextBox>
<asp:RequiredFieldValidator id="rfrSubject" runat="server" ErrorMessage="RequiredFieldValidator" ControlToValidate="txtEmail" style="z-index: 109; left: 592px; position: absolute; top: 418px" Width="166px">* Subject is required</asp:RequiredFieldValidator>
<asp:Label id="Label4" runat="server" Font-Bold="True" style="z-index: 110; left: 180px; position: absolute; top: 490px">Message:</asp:Label>
<asp:TextBox id="txtMessage" runat="server" Width="456px" Height="200px" style="z-index: 111; left: 262px; position: absolute; top: 480px"></asp:TextBox>
<asp:RequiredFieldValidator id="rfvMessage" runat="server" Width="72px" Height="48px" ErrorMessage="RequiredFieldValidator" ControlToValidate="txtMessage" style="z-index: 112; left: 177px; position: absolute; top: 530px">* Message is required</asp:RequiredFieldValidator>
<asp:ImageButton ID="SubmitButton" runat="server" ImageUrl="~/Images/submit.gif"
Style="z-index: 113; left: 330px; position: absolute; top: 699px; right: 657px;"
OnClick="SubmitButton_Click" Height="42px" Width="104px" />
<asp:ImageButton ID="ClearButton" runat="server" ImageUrl="~/Images/ClearForm.gif"
Style="z-index: 114; left: 575px; position: absolute; top: 702px" Height="36px" OnClick="ClearButton_Click" Width="99px" />
<asp:Label ID="Label5" runat="server" Style="z-index: 116; left: 761px; position: absolute;
top: 561px" Text="If you prefer to call dial Kirk at 727-643-8080" Width="141px"></asp:Label>
</div>
</form>
</body>
</html>
The only code behind for this page...
protected void SubmitButton_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("MailSent.aspx?txtFrom=" + txtFrom.Text.Trim() + "&txtEmail=" + txtEmail.Text.Trim() + "&txtSubject=" + txtSubject.Text.Trim() + "&txtMessage=" + txtMessage.Text.Trim());
}
protected void ClearButton_Click(object sender, ImageClickEventArgs e)
{
this.txtFrom.Text = "";
this.txtSubject.Text = "";
this.txtMessage.Text = "";
this.txtEmail.Text = "";
}
The receiving/processing page code behind...
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Mail;
namespace CovertConsulting
{
public partial class MailSent : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
try
{
string person = Request.QueryString["txtFrom"];
string emailfrom = Request.QueryString["txtEmail"];
string subject = Request.QueryString["txtSubject"];
string message = Request.QueryString["txtMessage"];
const string SERVER = "relay-hosting.secureserver.net";
MailMessage oMail = new System.Web.Mail.MailMessage();
oMail.From = emailfrom;
oMail.To = "kcovert1@verizon.net";
oMail.Subject = subject;
oMail.BodyFormat = MailFormat.Text; // enumeration
oMail.Priority = MailPriority.High; // enumeration
oMail.Body = "From: " + person + " " + message + " " + "Sent at: " + DateTime.Now;
SmtpMail.SmtpServer = SERVER;
SmtpMail.Send(oMail);
oMail = null; // free up resources
lblDunnMess.Text = "Email sent!, Thankyou!";
}
catch (Exception ex)
{
lblDunnMess.Text = "Email Send Failed: " + ex.Message;
}
}
}
}
The reason this works is becasue the Godaddy site does not do it's prevent when the information for the email is passed like this instead of getting the information using code behind on the same aspx page. Hard coding does work if done on the same page using code behind.
I've been searching all over the net for a solution to using a ContactUs web form to use with my GoDaddy Webhost account. I tried multiple examples and all have failed. I'm especially interested in Kirk's post since he has worked on a .net version..now I'm wondering if this code still works..I had many failed attempts due to outdated code. Can anyone help.
http://nicole.cfwebtools.com/index.cfm/2010/4/15/G...
Another point - I got error while using Gmail account with point (e.g: some.body@gmail.com), my solution:
myMail.From="" & senderEmail & "<my email>"
But you cannot use Reply.
Somebody with another solution?
http://www.ugamewow.com wow gold instant http://www.aionkina4u.com aion gold
http://www.aionkinashop.net aion kinah http://www.guy4mesos.com maple story mesos
http://www.rsgold-store.com rs gold http://www.cheap-luna-gold.com luna gold
http://www.lastchaos4gold.com last chaos gold http://www.flyff-penya-store.com flyff penya
http://www.2moonsdilshop.com 2moons dil http://www.fastcabalalz.com cabal alz
http://www.cheap-rappelz-rupees.com rappelz rupees http://www.cheapshaiyagold.com shaiya gold
http://www.knight4noah.com knight gold http://www.fasteveisk.com Eve isk
http://www.cheap-Archlord-gold.com Archlord gold http://www.Dragonicacrone.com Dragonica crone
<a href="http://www.vibram5fs.com ">vibram</a>is the world leader in high performance rubber soles, targeted to the outdoor, work, recreation, fashion, repair and orthopedic markets.<a href="http://www.vibram5fs.com ">five fingers</a> is the featured product of their. <a href="http://www.vibram5fs.com ">vibram five fingers </a> are very famous all over of the world<a href="http://www.vibram5fs.com ">five fingers vibram</a><a href="http://www.vibram5fs.com ">vibram five</a><a href="http://www.vibram5fs.com/vibram-five-fingers-classic-c-1.html" target="_blank">http://www.vibram5fs.com/vibram-five-fingers-class... ">vibram five fingers sale</a>,there are several kinds:<a href="http://www.vibram5fs.com/vibram-five-fingers-classic-c-1.html" target="_blank">http://www.vibram5fs.com/vibram-five-fingers-class... ">vibram five fingers classic</a><a href="http://www.vibram5fs.com/vibram-five-fingers-flow-c-10.html" target="_blank">http://www.vibram5fs.com/vibram-five-fingers-flow-... ">vibram five fingers flow</a><a href="http://www.vibram5fs.com/vibram-five-fingers-kso-c-13.html" target="_blank">http://www.vibram5fs.com/vibram-five-fingers-kso-c... ">vibram five fingers kso</a>,if you want to buy <a href="http://www.vibram5fs.com/vibram-five-fingers-classic-c-1.html" target="_blank">http://www.vibram5fs.com/vibram-five-fingers-class... ">cheap vibram five fingers</a><a href="http://www.vibram5fs.com/vibram-five-fingers-classic-c-1.html" target="_blank">http://www.vibram5fs.com/vibram-five-fingers-class... ">vibram five fingers surge</a><a href="http://www.vibram5fs.com/vibram-five-fingers-flow-c-10.html" target="_blank">http://www.vibram5fs.com/vibram-five-fingers-flow-... ">vibram five fingers kso black</a><a href="http://www.vibram5fs.com/vibram-five-fingers-flow-c-10.html" target="_blank">http://www.vibram5fs.com/vibram-five-fingers-flow-... ">buy vibram five fingers</a><a href="http://www.vibram5fs.com/vibram-five-fingers-kso-c-13.html" target="_blank">http://www.vibram5fs.com/vibram-five-fingers-kso-c... ">vibram five fingers discount</a><a href="http://www.vibram5fs.com/vibram-five-fingers-kso-c-13.html" target="_blank">http://www.vibram5fs.com/vibram-five-fingers-kso-c... ">vibram five fingers size</a><a href="http://www.vibram5fs.com/vibram-five-fingers-kso-trek-c-45.html" target="_blank">http://www.vibram5fs.com/vibram-five-fingers-kso-t... ">vibram five fingers reviews</a><a href="http://www.vibram5fs.com/vibram-five-fingers-kso-trek-c-45.html" target="_blank">http://www.vibram5fs.com/vibram-five-fingers-kso-t... ">vibram five fingers shoes</a><a href="http://www.vibram5fs.com/vibram-five-fingers-kso-trek-c-45.html" target="_blank">http://www.vibram5fs.com/vibram-five-fingers-kso-t... ">vibram five fingers shoe</a><a href="http://www.vibram5fs.com/vibram-five-fingers-kso-trek-c-45.html" target="_blank">http://www.vibram5fs.com/vibram-five-fingers-kso-t... ">the vibram five fingers</a><a href="http://www.vibram5fs.com/vibram-five-fingers-kso-trek-c-45.html" target="_blank">http://www.vibram5fs.com/vibram-five-fingers-kso-t... ">vibram five fingers ebay</a><a href="http://www.vibram5fs.com/vibram-five-fingers-performa-jane-c-42.html" target="_blank">http://www.vibram5fs.com/vibram-five-fingers-perfo... ">vibram five fingers women</a><a href="http://www.vibram5fs.com/vibram-five-fingers-performa-jane-c-42.html" target="_blank">http://www.vibram5fs.com/vibram-five-fingers-perfo... ">new vibram five fingers</a><a href="http://www.vibram5fs.com/vibram-five-fingers-sprint-c-27.html" target="_blank">http://www.vibram5fs.com/vibram-five-fingers-sprin... ">vibram five finger running</a><a href="http://www.vibram5fs.com/vibram-five-fingers-sprint-c-27.html" target="_blank">http://www.vibram5fs.com/vibram-five-fingers-sprin... ">vibram five fingers hiking</a><a href="http://www.vibram5fs.com/vibram-five-fingers-bikila-c-44.html" target="_blank">http://www.vibram5fs.com/vibram-five-fingers-bikil... ">vibram five fingers Bikila</a><a href="http://www.vibram5fs.com/vibram-five-fingers-performa-c-41.html" target="_blank">http://www.vibram5fs.com/vibram-five-fingers-perfo... ">vibram five fingers Performa</a><a href="http://www.vibram5fs.com/vibram-five-fingers-performa-jane-c-42.html" target="_blank">http://www.vibram5fs.com/vibram-five-fingers-perfo... ">vibram five fingers Performa Jane</a><a href="http://www.vibram5fs.com/vibram-five-fingers-sprint-c-27.html" target="_blank">http://www.vibram5fs.com/vibram-five-fingers-sprin... ">Vibram Five Fingers Sprint</a> you can go to vibram5fs.com