CDOSYS The Different SendUsing Options

There are two different ways that you can send e-mails using CDOSYS (aka CDO for Windows 2000):

  1. Using an SMTP server
  2. Using a pickup folder

Using an SMTP server

Using an SMTP server is probably the most common approach that people use to send out e-mails. Each time you send an e-mail it communicates with the server and sends out your e-mail. This is great for just a few e-mails but if you have too many then you'll start to notice slow response times and even page timeouts. To resolve the timeout issue you can increase the timeout for the page. It's not the most practical solution but if you don't expect the level of e-mails to grow past a certain point, it may do the trick.

The other option you have is to have the page reload after sending out a certain block of e-mails. Each time the page loads it grabs the next block of e-mail addresses, sends them, and then reloads the page again to send the next block until it's all done.

Using a pickup folder

The other option is to use the SMTP pickup folder. The pickup folder is a folder located on the filesystem that the SMTP server monitors. When new messages are placed in there, it'll send them off. The largest advantage of this method is speed. CDOSYS places the message into the folder and then it's done. The disadvantage is that there is no feedback if there are problems sending the e-mail.

I, personally, have had issues in using the pickup folder. I occasionally receive the error message, "The process cannot access the file because it is being used by another process". There is a fix available from Microsoft but in my case, the application was running on an ISP where I could not resolve this problem. Hopefully, you won't have the same dilemma.

The other possible problem is how many e-mails can be sent at once. The default properties limit 20 messages per connection. You can modify this from the IIS admin. Right click on the SMTP Server and click on Properties. On the Messages tab is the "Limit number of messages per connection" setting.

For more information

If you are just getting started with CDO, be sure to check out the following resources:

Published February 04, 2005 · Updated September 17, 2005
Categorized as ASP
Short URL:

Want to learn about scaling CSS for large projects?

I'm available for full and half-day workshops on scalable CSS architecture. I can provide on-site training for your team. Interested?
Get in touch.