MAPI Functions Reference

MAPI (Messaging Application Programming Interface) is a message architecture and a client interface component. It enables applications to access multiple message systems with only one interface.

Mail Clients like MS Outlook implement this interface. Therefore it is possible to use MAPI for accessing Microsoft Exchange Mailboxes via MS Outlook’s MAPI interface.

Silk Performer introduces a new API for accessing MAPI mailboxes and for creating/deleting and modifying messages within those mailboxes.

Problems with MAPI

Security

Most Mail Clients in their latest versions introduce new security options. Microsoft Outlook or Eudora for example – prohibit MAPI Access to their application by default.

In order to use Silk Performer MAPI Support – those security settings need to be changed. This is normally done in the options menu of the respective client application.

Incomplete Implementation

Not all mail clients implement the full range of the MAPI interface. If a MAPI client that does not support a certain interface method is used, you will likely see replay error like “Function not supported”. This is therefore no problem of Silk Performer – it is just a limitation of the used client.

MAPI Support in Silk Performer

Silk Performer MAPI Support is only for replaying. There is no recording of MAPI activities so far.

The new API functions are:

Logon/Logoff:

  • MapiLogoff: Closes a MAPI Session that has been opened with MapiLogon.

  • MapiLogon: Creates a new MAPI Session. You need to specify the MAPI profile name and a password to logon to a new MAPI session.

Sending:

  • MapiSendMessage: Creates a new message in the active session and sends it right away.

  • MapiSendMessageEx: Sends a message that has been created with MapiCreateMessage.

Creating/Deleting/Saving:

  • MapiCreateMessage: Creates a new message and returns a handle for that new message.

  • MapiDeleteMessage: Deletes a message.

  • MapiSaveMessage: Saves changes to a message.

Accessing Message Properties:

  • MapiGetLastError: Calling this method returns the error number of the last MAPI call.

  • MapiGetMessageAttachment: Retrieves information about a message attachment.

  • MapiGetMessageProperty: Retrieves message property values from a valid MAPI Message.

  • MapiGetMessageRecipient: Retrieves information about a message recipient.

  • MapiGetMessage: Retrieves a message identified by the Message ID from an active MAPI Session.

  • MapiGetNextMsgId: Returns the next Message ID in the Inbox of the MAPI Session.

  • MapiSetMessageAttachment: Sets information about a message attachment.

  • MapiSetMessageProperty: Sets a message property value of a valid MAPI Message.

  • MapiSetMessageRecipient: Sets information about a message recipient.

Misc functions:

  • MapiInit: Initializes MAPI Support for the current virtual user.

  • MapiExit: Unloads MAPI support for the current virtual user.

  • MapiFreeMessage: Frees the memory occupied by the message handle of the virtual user.