How do I use CDOSYS?

CDOSYS is a replacement for CDONTS and should be used instead of it.
CDONTS has been removed from Windows 2003 and is no longer supported
in Server 2003. A working example is below:

Dim objMsg
Dim objConfig
Set objMsg = CreateObject(“CDO.Message”)
Set objConfig = CreateObject(“CDO.Configuration”)
Dim objFields
Set objFields = objConfig.Fields
‘ Setup server information. Comment out if using localhost
objFields(“”) = “”
objFields(“”) = 25
objFields(“”) = 2

‘ Setup server login information if your server require it. Comment out if using localhost
objFields(“”) = 1
objFields(“”) = “SMTPAUTHUser”
objFields(“”) = “SMTPAUTHPassword”

‘uncomment if using localhost.
‘objFields(“”) = 1


‘ Now you can setup message to send
Set objMsg.Configuration = objConfig
objMsg.To = “”
objMsg.From = “”
objMsg.Subject = “Some subject”
objMsg.TextBody = txMessage

set objMsg = NOTHING

Share on Twitter
Share on Facebook