Click here to Skip to main content
14,243,622 members

A Beginner's Guide to CDOSYS

Rate this:
4.08 (13 votes)
Please Sign up or sign in to vote.
4.08 (13 votes)
5 Sep 2003
Use CDOSYS instead of CDONTS on Windows 2000/XP

Sample Image - cdoex.gif


Use this example to allow users of your website to submit feedback and send emails using IIS and its SMTP service.


CDOSYS is the successor of CDONTS, an easy way to send emails from webpages. Unfortunately, CDONTS was discontinued in Windows XP, so web authors must now use CDOSYS instead. CDOSYS is as easy to use as CDONTS, however CDOSYS also allows authors to create much more sophisticated emails using html and datasources.


  • Windows 2000/XP
  • SMTP Service for IIS installed
  • Run this sample on your own computer with IIS installed.
  • Put the files in a web server directory.
  • Do not open the htm page in Windows explorer and expect it to work. You must use the internet so that IIS is involved in the processing. For example, will work. c:\downloads\sample1\sample1.htm won't work.
  • Using JScript as the .asp language doesn't work as easily as vbscript does.

Using the code

The first step is to call the components into action...

Dim iMsg
Set iMsg = CreateObject("CDO.Message")
Dim iConf
Set iConf = CreateObject("CDO.Configuration")

Step 2 involves verifying the correct configuration settings...

Dim Flds
Set Flds = iConf.Fields
Flds("") = 1
Flds( _
 "") _
  = "c:\inetpub\mailroot\pickup"

Be especially mindful of the path in the code above. Step 3 shows how the message is constructed...

Set iMsg.Configuration = iConf
iMsg.To = Request.Form.Item("Email")
iMsg.From = ""
iMsg.Subject = Request.Form.Item("Subject")
iMsg.TextBody = Request.Form.Item("EContent")

The Request.Form.Item grabs the data posted to it from the form on the sample1.htm page.

Points of Interest

This is really the tip of the iceberg. There is so much more that you could do with CDOSYS (and CDOEX). See for more details...


  • Sept. 6/03 - Posted this article


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Web Developer
Canada Canada
It's Frum the Slum

Comments and Discussions

AnswerRe: and jscript? Pin
Scidd0w30-Jan-04 3:48
memberScidd0w30-Jan-04 3:48 
GeneralRe: and jscript? Pin
Mario Vargas21-Apr-04 5:08
memberMario Vargas21-Apr-04 5:08 
GeneralCDOSYS, not CDOEX Pin
kojiishi7-Sep-03 16:17
memberkojiishi7-Sep-03 16:17 
GeneralRe: CDOSYS, not CDOEX Pin
rbeckett7-Sep-03 18:33
memberrbeckett7-Sep-03 18:33 
GeneralProblem with Regsvr32 cdosys.dll Pin
ulricht30-Mar-05 3:04
memberulricht30-Mar-05 3:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Posted 5 Sep 2003


30 bookmarked