Our eMailer Application

Our first example will be called eMailer:

With this program, we can check email and download it as well as compose and send email. We can even perform another function with eMailer: many programs allow the user to "register" with the click of the mouse, and we'll do that, too. We will set up eMailer to send a prewritten registration message to our email address; to register, all the user must do is to click a Register Now item in the Help menu. This action will send the message to us automatically, including the user's name and email address so that we can register him or her.

Using the Visual Basic Application Wizard, create a new SDI application named eMailer. This is the example program that we will add email capabilities to, so add the two MAPI controls that we'll need—MAPISession and MAPIMessages—by selecting the Components item of the Visual Basic Project menu. Select the entry marked Microsoft MAPI Control 5.0 and click OK. Next, double-click each icon of these new controls in the toolbox, adding two new controls to our application: MAPISession1 and MAPIMessages1. Now we're ready to go; we will start by checking the user's email from eMailer.

© 1997 by Steven Holzner. All rights reserved.