Reading a Message
The general approach to reading a message is as follows (details are in the examples below)
- Log on to MAPI to get a session handle
- Call MAPIFindNext to get the message ID of the message
- Call MAPIReadMail, passing the message ID, MAPIMessage, MAPIRecip(), and MAPIFile() variables as arguments
- Examine the MAPIMessage variable to get the text of the message
- Examine the array of MAPIRecip variables to get recipient information
- Examine the array of MAPIFile variables to get details about each attachment
- Log off MAPI