Hi. I'm actually writing VBScript but I couldn't subscribe to that forum.
I used to use CDONTS in active server pages on a 2000 server. Now I'm working on an XP Server and I've heard that I need to use CDOSYS instead. I've seen many samples of this code but it doesn't work for me. (Perhaps its written for 2000 only?)
This is code from MS to send a webpage via the SMTP server:
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
' assume constants are defined within script file
.Item(cdoSendUsingMethod) = cdoSendUsingPickup '2 ' cdoSendUsingPort
.Item(cdoSMTPServerName) = MailServer
.Item(cdoSMTPConnectionTimeout) = 10 ' quick timeout
.Item(cdoSMTPAuthenticate) = cdoBasic
.Item(cdoSendUserName) = "UserName"
.Item(cdoSendPassword) = "Password"
.Item(cdoURLProxyServer) = "server:80"
.Item(cdoURLProxyBypass) = "<local>"
.Item(cdoURLGetLatestVersion) = True
Set .Configuration = iConf
.To = "PhilMcRevis@hotmail.com"
.From = "PhilMcRevis@hotmail.com"
.Subject = "Hows it going? I've attached my web page"
There are many variations on this code, but they all give errors when the fields start getting filled in:
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
Does anyone know how to get this working on an XP Server? I've tested the mail server and I can use it to send email with Outlook Express.