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.
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.
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.