Collaboration Data Objects (CDO)

Originally known as Active Messaging, the Collaboration Data Objects (CDO) library allows users to send mails through ASP Scripts.

Collaboration Data Objects (CDO) is Microsoft's technology for building messaging or collaboration applications or adding these capabilities to existing applications. Part of the Microsoft Exchange Server product, CDO has evolved from what Microsoft formerly called Object Linking and Embedding Messaging and, more recently, Active Messaging.

You can use the sample script provided by Digighana and tweak it a bit to your requirements, to accept feedback from your website visitors and get the results emailed to you.

You would need to change the Email Address in the field myMail.From to any Email Address on the domain name on which you are incorporating the script.


If your Domain Name is, then you would define the From Email Address as This Email Address need not be existing on the Mail Server of, however, the domain name in the myMail.From field has to be yours. You may use an Email Address such as

The Email Address in the myMail.To field needs to be changed to your Email Address, where you wish to receive Emails submitted through the form.

Sample Script

Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.TextBody="This is a message."
myMail.Configuration.Fields.Item _
'Name or IP of remote SMTP server
myMail.Configuration.Fields.Item _
'Server port
myMail.Configuration.Fields.Item _


The body of the mail should not have bare linefeeds (\n). If a bare linefeed is detected, the SMTP service of Microsoft IIS6 (the Web Server running on Digighana's Windows servers) will stop delivering any mail and the mails will get struck in the SMTP queue. This is because Microsoft IIS6 strictly follows Internet e-mail standards; and these standards forbid the presence of bare linefeed characters in e-mail messages.

Additional Information

Bare LineFeeds in SMTP


myMail.TextBody="Thank you for contacting us. We shall get back to you shortly.\n
Kind regards\n"

In the above case, bare linefeeds (\n) are being used. Instead of \n, you need to use \r\n (carriage-return, line-feed). Hence, the correct usage would be:

myMail.TextBody="Thank you for contacting us. We shall get back to you shortly.\r\n
Kind regards\r\n"