Wrox Programmer Forums
|
ASP CDO As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP CDO section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 14th, 2004, 08:25 AM
Registered User
 
Join Date: Oct 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Understanding how CDO works

Hi

All help is gratefully received.

I have run into what I am sure has a simple solution. In a simple feedback page I was using the the objCDONTS to creat an email function to a generic email account for feedback. We were running windows 2000 and that worked well. Now have migrated to a win 2003 server the objCDONTS is not supported. I have read through various articles on changing the object to CDO but this is not working:

My code below adapts the objcdo but this does not work. I would be grateful for a solution.


Dim objCDO ' Email object
Dim strFromName ' From persons' real name
Dim strFromUnit ' from division
Dim strFromLocation ' from building location
Dim strFromTeleNum ' from telephone number
Dim strCheckBox ' from checkbox -
Dim strFromEmail, strToEmail, strBcEmail ' Email addresses
Dim strSubject, strBody ' Message
Dim misccompo


strSubject = "Getting Involved - Feedback"
strFromName = Trim(Request.Form("name"))
strFromUnit = Trim(Request.Form("unit"))
strFromLocation = Trim(Request.Form("location"))
strFromTeleNum = Trim(Request.Form("telenum"))
strFromEmail = Trim(Request.Form("email"))
strOptList = Trim(Request.Form("optlist"))
strCheckBox = Trim(Request.Form("checkbox"))
strToEmail = "email address goes here"
strBccEmail = "email address goes here"
strBody = Trim(Request.Form("message"))

Set objCDO = Server.CreateObject("CDONTS.NewMail")
              objCDO.From = strFromName & " <" & strFromEmail & ">"
             objCDO.To = strToEmail
             objCDO.BCc = strBccEmail
             objCDO.Subject = strSubject
 objCDO.Body = "--------------------------------------------------------------" & vbcrlf & vbcrlf & "GENERATED FROM GETTING INVOLVED FEEDBACK FORM contact.asp" & vbcrlf & vbcrlf & "name: " & strFromName & vbcrlf & "Unit: " & strFromUnit & vbcrlf & "Location: " & strFromLocation & vbcrlf & "Telephone: " & strFromTeleNum & vbcrlf & "Selected from list: " & strOptList & vbcrlf & vbcrlf & "to be seen by the Permanent Secretary: " & strCheckBox & vbcrlf & vbcrlf & strbody & vbcrlf & vbcrlf & vbcrlf & "--------------------------------------------------------------" & vbcrlf & "MESSAGE ENDS: End of message"
  objCDO.Send
  Set objCDO = Nothing

response.redirect "thanks.asp"
response.end
%>

Thanks again for your help.

Kind regards


 
Old October 15th, 2004, 02:16 AM
Friend of Wrox
 
Join Date: May 2003
Posts: 229
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What error you are getting, also check the availability of CDONTS on deployment machine

Charul Shukla
 
Old October 15th, 2004, 02:24 AM
Friend of Wrox
 
Join Date: May 2003
Posts: 229
Thanks: 0
Thanked 0 Times in 0 Posts
Default

you can also visit the following URL

http://www.aspfaqs.com/aspfaqs/ShowC...y.asp?CatID=10

Charul Shukla
 
Old October 15th, 2004, 10:48 AM
Registered User
 
Join Date: Oct 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for pointing me in the right direction this is helpful.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help understanding validation kscase Pro Visual Basic 2005 1 July 7th, 2007 07:15 PM
understanding Variable use imroostercogburn C++ Programming 7 July 28th, 2006 06:15 PM
Understanding Recordsets? JpaulH Access VBA 2 May 10th, 2006 07:18 PM
Understanding Session rajuru Beginning PHP 2 September 25th, 2004 05:05 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.