•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 401,652 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,561 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 6418 | Replies: 0
![]() |
•
•
Join Date: Jan 2005
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
:o I need help with CDO for Windows 2000. I had a htm web page form that when submitted it would go to an asp confirm page. The submitter could review his submission then press the submit button. That page would be submitted to an asp, by CDONTS (CDO for NT servers), page that would send the information to me by email and then redirect the page back to the home page. It all worked fine.
NOW my web hosting provide has made a change to CDO for Windows 2000 and has provide the Script below.
I can not get it to work. And my provide is slow at helping. I have made the email and password changes, removed the underscores to put the http’s on the same line and added at the top and bottom <% %> and made the page an asp page. But when I call the page all I get is “The page cannot be displayed�.
Questions:
1. Using the Script below, should the page itself without something being submitted to it return an email?
2. What are all those http addresses? Are they on my host servers?
3. Can someone tell me where I can get a very simple submit form and tell me what I need to add the Script to make that submit form work?
I been doing a lot of looking at other help forums and the script seems the same. Not much difference. I even tried those scripts.
' CDO for Windows 2000 Sample Script
'=============================================
' First You should declare the constants and ServerObjects.
'-----------------------------------------------------
Const cdoSendUsingMethod = _
"http://schemas.microsoft.com/cdo/configuration/sendusing"
Const cdoSendUsingPort = 2
Const cdoSMTPServer = _
"http://schemas.microsoft.com/cdo/configuration/smtpserver"
Const cdoSMTPServerPort = _
"http://schemas.microsoft.com/cdo/configuration/smtpserverport"
Const cdoSMTPConnectionTimeout = _
"http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
Const cdoSMTPAuthenticate = _
"http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
Const cdoBasic = 1
Const cdoSendUserName = _
"http://schemas.microsoft.com/cdo/configuration/sendusername"
Const cdoSendPassword = _
"http://schemas.microsoft.com/cdo/configuration/sendpassword"
Dim objConfig ' As CDO.Configuration
Dim objMessage ' As CDO.Message
Dim Fields ' As ADODB.Fields
' Then define the CDO configuration ...
'-----------------------------------------------------
Set objConfig = Server.CreateObject("CDO.Configuration")
Set Fields = objConfig.Fields
With Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "mail.0web-hosting.com"
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPConnectionTimeout) = 20
.Item(cdoSMTPAuthenticate) = cdoBasic
.Item(cdoSendUserName) = "Your-Email-Address"
.Item(cdoSendPassword) = "Your_Password"
.Update
End With
' ... so You can create and send an email.
'-----------------------------------------------------
Set objMessage = Server.CreateObject("CDO.Message")
Set objMessage.Configuration = objConfig
With objMessage
.To = "Recepient_Name <Recepient_Email_Address>"
.From = "Your_Name <Your-Email-Address>"
.Subject = "The_Subject_Of_Your_Email"
.TextBody = "The_Body_Of_Your_Email"
.Send
End With
' Don't forget to remove the objects once You're done
'-----------------------------------------------------
Set Fields = Nothing
Set objMessage = Nothing
Set objConfig = Nothing
To be able to use this sample code, please change "Your-Email-Address" with Your actual email, "Your_Password" with the mailbox password, etc.
NOW my web hosting provide has made a change to CDO for Windows 2000 and has provide the Script below.
I can not get it to work. And my provide is slow at helping. I have made the email and password changes, removed the underscores to put the http’s on the same line and added at the top and bottom <% %> and made the page an asp page. But when I call the page all I get is “The page cannot be displayed�.
Questions:
1. Using the Script below, should the page itself without something being submitted to it return an email?
2. What are all those http addresses? Are they on my host servers?
3. Can someone tell me where I can get a very simple submit form and tell me what I need to add the Script to make that submit form work?
I been doing a lot of looking at other help forums and the script seems the same. Not much difference. I even tried those scripts.
' CDO for Windows 2000 Sample Script
'=============================================
' First You should declare the constants and ServerObjects.
'-----------------------------------------------------
Const cdoSendUsingMethod = _
"http://schemas.microsoft.com/cdo/configuration/sendusing"
Const cdoSendUsingPort = 2
Const cdoSMTPServer = _
"http://schemas.microsoft.com/cdo/configuration/smtpserver"
Const cdoSMTPServerPort = _
"http://schemas.microsoft.com/cdo/configuration/smtpserverport"
Const cdoSMTPConnectionTimeout = _
"http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
Const cdoSMTPAuthenticate = _
"http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
Const cdoBasic = 1
Const cdoSendUserName = _
"http://schemas.microsoft.com/cdo/configuration/sendusername"
Const cdoSendPassword = _
"http://schemas.microsoft.com/cdo/configuration/sendpassword"
Dim objConfig ' As CDO.Configuration
Dim objMessage ' As CDO.Message
Dim Fields ' As ADODB.Fields
' Then define the CDO configuration ...
'-----------------------------------------------------
Set objConfig = Server.CreateObject("CDO.Configuration")
Set Fields = objConfig.Fields
With Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "mail.0web-hosting.com"
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPConnectionTimeout) = 20
.Item(cdoSMTPAuthenticate) = cdoBasic
.Item(cdoSendUserName) = "Your-Email-Address"
.Item(cdoSendPassword) = "Your_Password"
.Update
End With
' ... so You can create and send an email.
'-----------------------------------------------------
Set objMessage = Server.CreateObject("CDO.Message")
Set objMessage.Configuration = objConfig
With objMessage
.To = "Recepient_Name <Recepient_Email_Address>"
.From = "Your_Name <Your-Email-Address>"
.Subject = "The_Subject_Of_Your_Email"
.TextBody = "The_Body_Of_Your_Email"
.Send
End With
' Don't forget to remove the objects once You're done
'-----------------------------------------------------
Set Fields = Nothing
Set objMessage = Nothing
Set objConfig = Nothing
To be able to use this sample code, please change "Your-Email-Address" with Your actual email, "Your_Password" with the mailbox password, etc.
![]() |
•
•
•
•
•
•
•
•
DaniWeb ASP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
aero ajax apple asp browser cd choose computer crack dell developer development download drm explorer france ie 7 install internet leopard license licensing linux microsoft mobile news office open operating operating system os parliament phishing photo reader security server software source switching system ubuntu unix upgrade vista volume windows windows update windows vista xp
- What's better? Windows 2000 Server or Linux Server? (Windows Servers and IIS)
- Windows 2000 Adv Server and "Printing Subsystem" (Windows NT / 2000 / XP / 2003)
- Windows 2000 SP3 (Windows NT / 2000 / XP / 2003)
Other Threads in the ASP Forum
- Previous Thread: sql server connection
- Next Thread: java script for main menu


Linear Mode