CDONTS Problem

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

%>
 
R

Ray at

You're using GET? Interesting.

Is the SMTP service running on your server?
Are there any messages in the application or system log?
Are there a bunch of messages sitting in the server's pickup directory or
queue directory?
Have you tried creating a test page to send yourself e-mail that does not
conditionally send only if something is true as you have below?
Have you tried just commenting out your IF statement, which is probably not
going to be true since Request.Querystring("isSubmitted") probably equals
"1" not 1?


Try some of those things.

Ray at work
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top