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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CDOSYS trouble

Status
Not open for further replies.

scroce

MIS
Nov 30, 2000
780
US
I've seen innumerable postings on this, but I'm still unclear on a couple of things.

I have a simple form which allows people to request a video. When the form is submitted, the page sends and alert email to the video librarian.

My code for CDONTS worked fine, but we've since upgraded to Server2003, and I have my test environment hosted on IIS 5.1 on an XP professional machine Therefore I'm going thru the process of converting the code to CDOSYS

So here is an example of the plain vanilla code which I have seen posted in many places as usable code, but for me submitting it yields the error:

CDO.Message.1 (0x80040220)
The "SendUsing" configuration value is invalid.


Code:
Set objNewMail = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
With Flds 
    .Item("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/sendusing")[/URL] = 2 ' cdoSendUsingPort
    '.Item("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpserver")[/URL] = "smtp.mail.server"
    .Item("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpserver")[/URL] = "127.0.0.1"
    .Item("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")[/URL] = 10 ' quick timeout
    .Item("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/urlgetlatestversion")[/URL] = True
    .Item("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpauthenticate,[/URL] 2")    
    .Update
End With

message = "HTML message text"
With objNewMail
    .From = "nobody@nowhere.com"
    .To = "validaddress@mycompany.com"    
    .Subject = "subject text"
    .HTMLBody = message
    .send      'Send the new email
end with         
set objNewMail = Nothing

I really don't understand this code - could somebody explain to me what all the stuff is all about? Why is this needed? What does it accomplish? I thought it was for use if you didn't have SMTP configured on your IIS, but I have not seen any postings that don't use these links.


As an aside, I believe that SMTP is configured on my IIS, b/c I am showing "Default SMTP Virtual Server" in my IIS window - am I correct in this?

appreciate any general or specific input.




I am a nobody, and nobody is perfect; therefore, I am perfect.
 
here's some info that might be of help, and a MS resource link to properties/methods of both, and hopefully through looking at it, might be able to establish the translation needed.

[thumbsup2]DreX
aKa - Robert
if all else fails, light it on fire and do the happy dance!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top