J
John Savidge
Hi All,
I had this simple CDONTS form to email code working a few days ago. However
it doesn't seem to work now as I am not receiving the emails the form
generates.
Below is my code, can anyone see any errors in it ? I think I've looked at
it too many times and keep missing an obvious error. The form posts the form
content to the query string.
Thanks
John
<%
If Request.QueryString("isSubmitted") = 1 Then
Dim ContactName, Email, Company, Address1, Address2, City, County, PostCode,
Country, Tel, Fax, BusinessType,Comments
Dim objCDO
ContactName = Request.QueryString("ContactName")
Email = Request.QueryString("EmailAddress")
Company = Request.QueryString("Company")
Address1 = Request.QueryString("Address1")
Address2 = Request.QueryString("Address2")
City = Request.QueryString("City")
County = Request.QueryString("County")
PostCode = Request.QueryString("PostCode")
Country = Request.QueryString("Country")
Telephone = Request.QueryString("Telephone")
Fax = Request.QueryString("Fax")
BusinessType = Request.QueryString("BusinessType")
Comments = Request.QueryString("Comments")
Set objCDO = Server.CreateObject("CDONTS.NewMail")
objCDO.From = Trim(EmailAddress)
objCDO.To = "(e-mail address removed)"
objCDO.Cc = "(e-mail address removed)"
objCDO.Subject = "Contact From Website at " & Now & " - Subscribe " &
EmailAddress & "Specification Update"
objCDO.Body = "<html><body>Contact from Website" _
& "<ul><li>Name: " & ContactName & "</li>" _
& "<li>Company: " & Company & "</li>" _
& "<li>Address 1: " & Address1 & "</li>" _
& "<li>Address 2: " & Address2 & "</li>" _
& "<li>City: " & City & "</li>" _
& "<li>County: " & County & "</li>" _
& "<li>Post Code: " & PostCode & "</li>" _
& "<li>Country: " & Country & "</li>" _
& "<li>Email Address: " & EmailAddress & "</li>" _
& "<li>Telephone: " & Telephone & "</li>" _
& "<li>Fax: " & Fax & "</li></ul>" _
& "<p><u>Business Type</u></p>" _
& BusinessType _
& "<p><u>Comments</u></p>" _
& Comments _
& "</body></html>"
objCDO.BodyFormat = 0
objCDO.MailFormat = 0
objCDO.Send
Set objCDO = Nothing
End If
%>
I had this simple CDONTS form to email code working a few days ago. However
it doesn't seem to work now as I am not receiving the emails the form
generates.
Below is my code, can anyone see any errors in it ? I think I've looked at
it too many times and keep missing an obvious error. The form posts the form
content to the query string.
Thanks
John
<%
If Request.QueryString("isSubmitted") = 1 Then
Dim ContactName, Email, Company, Address1, Address2, City, County, PostCode,
Country, Tel, Fax, BusinessType,Comments
Dim objCDO
ContactName = Request.QueryString("ContactName")
Email = Request.QueryString("EmailAddress")
Company = Request.QueryString("Company")
Address1 = Request.QueryString("Address1")
Address2 = Request.QueryString("Address2")
City = Request.QueryString("City")
County = Request.QueryString("County")
PostCode = Request.QueryString("PostCode")
Country = Request.QueryString("Country")
Telephone = Request.QueryString("Telephone")
Fax = Request.QueryString("Fax")
BusinessType = Request.QueryString("BusinessType")
Comments = Request.QueryString("Comments")
Set objCDO = Server.CreateObject("CDONTS.NewMail")
objCDO.From = Trim(EmailAddress)
objCDO.To = "(e-mail address removed)"
objCDO.Cc = "(e-mail address removed)"
objCDO.Subject = "Contact From Website at " & Now & " - Subscribe " &
EmailAddress & "Specification Update"
objCDO.Body = "<html><body>Contact from Website" _
& "<ul><li>Name: " & ContactName & "</li>" _
& "<li>Company: " & Company & "</li>" _
& "<li>Address 1: " & Address1 & "</li>" _
& "<li>Address 2: " & Address2 & "</li>" _
& "<li>City: " & City & "</li>" _
& "<li>County: " & County & "</li>" _
& "<li>Post Code: " & PostCode & "</li>" _
& "<li>Country: " & Country & "</li>" _
& "<li>Email Address: " & EmailAddress & "</li>" _
& "<li>Telephone: " & Telephone & "</li>" _
& "<li>Fax: " & Fax & "</li></ul>" _
& "<p><u>Business Type</u></p>" _
& BusinessType _
& "<p><u>Comments</u></p>" _
& Comments _
& "</body></html>"
objCDO.BodyFormat = 0
objCDO.MailFormat = 0
objCDO.Send
Set objCDO = Nothing
End If
%>