Platform SDK: MAPI |
The code examples in this section are provided to illustrate in detail the concepts discussed earlier. Additional code examples can be found in the SMPCLI application included with the MAPI Software Development Kit (SDK). SMPCLI is not a typical Simple MAPI application because it exists solely to illustrate every Simple MAPI function. It is good for illustrating the use of all the Simple MAPI APIs, but it is not good for illustrating typical use of those APIs in real situations. See Sample Simple MAPI Client.
The following three examples show how a client application can send and receive messages with varying degrees of control. The first example sends a message very simply, leaving creation of the message's contents almost entirely up to Simple MAPI through user interaction. The second example takes more control over creation of the message and demonstrates how to use the MAPIResolveName function to check that addresses are valid before sending. The third example shows how to receive and display a message. Comments precede sections that benefit from explanation.