O'Reilly logo

CDO & MAPI Programming with Visual Basic: by Dave Grundgeiger

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Enhancing the Email Client

The previous chapter discussed the basics of sending and receiving email messages. The techniques given there are enough to complete a wide variety of email tasks—perhaps most that you’re likely to run into. However, if you’re writing a complete email client application or if your messaging application requires exceptional control over email, you’ll need more. This chapter rounds out the discussion of CDO capabilities as they apply to email. With the information in this chapter, you’ll have complete control over the email experience.

How CDO Wraps MAPI Objects

Your understanding of CDO behavior will be heightened greatly if you remember the following: CDO objects and MAPI objects are not the same thing.

MAPI objects are COM objects exposed by the MAPI Subsystem and third-party software designed to be MAPI-compliant. Although they are COM objects, MAPI objects are not easily accessible through Visual Basic, and they are not accessible at all through scripting languages. Therefore, CDO was invented to be the bridge from these languages to MAPI. CDO exposes COM objects, but these COM objects are of the right nature to be accessible through both Visual Basic and scripting languages. CDO is built on top of MAPI, as illustrated in Figure 7-1, which means that when you instantiate a CDO object, that CDO object is accessing a MAPI object behind the scenes to do the real work.

Figure 7-1. CDO’s place in MAPI architecture

This can occasionally result ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required