Setting Up Internet Mail

The underlying email system installed on the user's computer does the actual work, as directed by the MAPI controls. For this reason, you should make sure that you have Microsoft Exchange set up for Internet Mail before working with the examples in this chapter. In Windows 95, open the Control Panel and double-click the Mail and Fax icon there, opening the MS Exchange Properties Settings dialog box. Then select the Services tab. If Internet Mail is one of the services listed in the Services dialog box, you're already set up. If it is not there, click the Add button to open the Add Service to Profile dialog box and click the Internet Mail entry. This opens the Internet Mail dialog box, as shown in Figure 4.1. Here you fill out the information about your Internet service provider, including your account name and password. Click OK.

Figure 4.1 Setting up Internet mail.

For the purposes of this chapter, we will assume that Microsoft Exchange is set up only for Internet mail this way and not for Microsoft mail or any other option. (Otherwise, you must make sure that you are set up to receive Microsoft Mail and any other types you specify; here, we'll look only at Internet mail.)

As before, if you are using a modem, you must also have a connection set up to your ISP so that the connection can be made. To do that in Windows 95, double-click the My Computer icon on the desktop and then open the Dial-up Networking icon. To add a new connection, double-click the Make New Connection icon and follow the directions there.

The MAPI controls are centered around the computer's Inbox; the Inbox icon appears on the Windows desktop. The MAPISession control, for example, automatically downloads any new email to the Inbox when it establishes a connection with your ISP. After your email is downloaded to the Inbox, you double-click the Inbox icon on the desktop to read it. (You can also fetch email from the Inbox in your Visual Basic program using the MAPIMessages control, as we'll see.)

Now that we know our email system is set up, let's start working with email in our Visual Basic programs.

© 1997 by Steven Holzner. All rights reserved.