Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CDONTS to CDOSYS

Status
Not open for further replies.

BobbaBuoy

Instructor
Joined
May 25, 2003
Messages
75
Location
US
I am moving my web files to a new (Win2003) server which is seperate from the box that holds my email server. I am having trouble with the 'Contact Us' kinds of pages that used to use CDONTS but now use CDOSYS. I believe the problem is the sendusing deal but it may be a port issue. Here is my code:

code:--------------------------------------------------------------------------------
Dim iMail, iConf, Flds
Dim sMsg, sName, sEmail, sSubject

sName = Request.Form.Item("name")
sEmail = Request.Form.Item("email")
sSubject = Request.Form.Item("subject")
sMsg = "From: " & sName & vbCrLf
sMsg = sMsg & "Email: " & sEmail & vbCrLf & vbCrLf
sMsg = sMsg & Request.Form.Item("message")

Set iMail = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
Flds " = 3
Flds.Update

Set iMail.Configuration = iConf
With iMail
.To = "me@mydomain.com"
.From = sEmail
.Subject = sSubject
.TextBody = sMsg
.Send
End With

Set iMail = Nothing
Set iConf = Nothing
Set Flds = Nothing
--------------------------------------------------------------------------------


I am open to suggestions. Thanks in advance!!!
 
I don't see the difference between what I have and what you are suggesting?
 
yours
Code:
Set iMail = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
Flds "[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/sendusing")[/URL] = 3
Flds.Update

edited for syntax
Code:
iConf.Flds("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/sendusing")[/URL] = 3
iConf.Flds.Update

the code looks to be fine other then that. other then looking for syntax issues or major object issues the error you are getting would probably help. is there one or is it just not getting through

___________________________________________________________________

onpnt.com
SELECT * FROM programmers WHERE clue > 0
(0 row(s) affected) -->faq333-3811
 
derrr.. declaration hell ay

ignore the iConf.Flds.

___________________________________________________________________

onpnt.com
SELECT * FROM programmers WHERE clue > 0
(0 row(s) affected) -->faq333-3811

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top