Share via


Mapi.logon Method

Logs on to the mail system by using the specified profile and password.

Syntax

public int logon(
    str profileName, 
    str password, 
    int flags)

Run On

Called

Parameters

  • profileName
    Type: str
    A valid mail profile on the server.
  • password
    Type: str
    The password for the specified profile.
  • flags
    Type: int
    A list of flags.
    The valid flags are as follows:

Return Value

Type: int
The status #SUCCESS_SUCCESS if the logon succeeded; otherwise, an error code, which can be found in the #MAPI macro.

Remarks

An easy and common way to log on is to specify the #MAPI_USE_DEFAULT flag, which logs on by using the default profile.

See Also

Mapi Class

Mapi.logoff Method