In this exercise, you will use ActiveX controls to create a mail-enabled application in Visual Basic. The ActiveX controls used in this exercise interface with MAPI.
* To set up a Microsoft Mail Postoffice
Box | Type (all lower case) |
Name | admin |
Mailbox | admin |
Password | password |
The remaining boxes can be left blank. Click OK .
Control | Property | Value |
Text1 | Name | txtEmail |
Text2 | Name | txtSubject |
RichTextBox1 | Name | rtbMessage |
Command1 | Name | cmdSendMail |
Caption | &Send Mail |
MAPISession1.SignOn With MAPIMessages1 .SessionID = Form1.MAPISession1.SessionID .Compose .MsgSubject = txtSubject.Text .MsgNoteText = rtbMessage.Text .RecipAddress = txtEmail.Text .AddressResolveUI = True .ResolveName .Send False End With MAPISession1.SignOff
The message will be sent to your post office account in Windows 95.
It may take a few seconds for the e-mail to arrive .
The Microsoft Messaging API makes information from MAPI-compliant messaging systems accessible to users across an organization. MAPI's open architecture allows services, such as fax, bulletin boards , and e-mail, to be used easily with any MAPI client application.
The MAPI front-end APIs are available in three parts . Simple MAPI and the Common Messaging Calls (CMC) support applications that require only basic messaging functions. Extended MAPI is used for creating advanced messaging-based applications.
MAPI provides the required API calls for messaging applications. These calls work with a second level of MAPI features called the messaging subsystem. The messaging subsystem responds to the API calls and performs the requested actions.
MAPI controls allow you to create messaging applications in Visual Basic. The MAPISession control signs on and establishes a MAPI session, and signs off from a MAPI session. The MAPIMessages control performs a variety of messaging system functions after a messaging session is established with the MAPISession control.