MapiLogon Function

Action

Creates a new MAPI Session. You need to specify the MAPI profile name and a password to logon to a new MAPI session. The method returns a valid session handle that will be passed to other MAPI functions for sending/reading/deleting messages.

Inclue file

Mapi.bdh

Syntax

MapiLogon( in sProfileName : string,
           in sPassword    : string allownull ): number;
Parameter Description
sProfileName Name of your local MAPI profile, e.g.: Outlook, Exchange Server, …
sPassword If you need a password to logon to your MAPI profile - provide the password. Otherwise pass NULL.

Return value

  • Session Handle if successful
  • 0 otherwise

Example

See MAPI Sample