473,395 Members | 1,613 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

CDONTS Problem

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 = "te**@nospam.co.uk"

objCDO.Cc = "li******@nospam.co.uk"

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

%>
Jul 19 '05 #1
2 2219
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

"John Savidge" <te**@lbj.co.uk> wrote in message
news:eS****************@TK2MSFTNGP10.phx.gbl...
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.Q

Jul 19 '05 #2
D'Oh, spotted problem now!
Email = Request.QueryString("EmailAddress") objCDO.From = Trim(EmailAddress)


Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Henry | last post by:
Hi, Im trying to send a mail from my webpage using CDONTS but i keep getting the errormessage "Invalid class string" (0x800401F3). I have the SMTP service installed and running on my IIS server on...
29
by: | last post by:
I did a working code with CDONTS on NT4 Now I am testing is on w2k and it looks like objCDONTS.Send is completely ignored. I think is it ignored because it throws no errors, neither does the...
4
by: Murat Dagdelen | last post by:
Hi, an asp script that uses cdonts is bringing an error while I submit it more then once. The script is a simple asp script that sends email by using cdonts. But when I run the script more then...
8
by: Boris | last post by:
Could someone please tell me if I can use CDONTS in W 2003 Server environment to send emails the same way it is used in W2K Server. I have heard that CDONTS is no longer available in W 2003 Server...
4
by: F | last post by:
Hi Some one has posted this question on 10th August, as CDONTS is not working on windows 2003 serever. I have the same problem and I copied CDONTS.DLL from Windows 2000 Server and registered on...
16
by: tshad | last post by:
I have both cdosys.dll and cdonts.dll on my W2K3 server. We have been told by our web authors that their asp code won't work on our machine and that we don't have CDONTS installed on our machine....
9
by: scott | last post by:
I have my win 2003 server setup correct with SMTP. I know because I've tested it ok. However, when I issue CODE 1 below, I get ERROR 1 below. I thought having SMTP installed correctly allowed...
5
by: MichaelK | last post by:
What do I need to do to enable CDONTS om my macine to make it working I'm testing the code: Dim objCDO Set objCDO = Server.CreateObject("CDONTS.NewMail") objCDO.To = "xyz@xxxxx.com"...
4
by: =?Utf-8?B?U2ltb25X?= | last post by:
Platform WinSVR 2003 IIS 6 Having installed and registered CDONTS.dll in \system32, I am still experiencing the following error message when runnng the intranet web site. (And my boss is getting...
3
by: tamaker | last post by:
I have Road Runner cable internet access and Im working in a local development environment (writing .ASP) and have a site running on my network on a windows xp pro machine via IIS with CDONTS...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.