wodImapServer ActiveX Component - StateChange Event
    
 

Description

Fires when user's state changes


Syntax

Private Sub object_StateChange(User, NewState, OldState)



The StateChange Event syntax has these parts:

Part Description
object A wodImapServer object.
User An ImapUser object. Reference to user whose state has changed.
NewState An ImapUserStates enumeration, as described in settings. Represents new state.
OldState An ImapUserStates enumeration, as described in settings. Represents old state.

Settings

The settings for OldState and NewState are:

Constant Value Description
 StateNotConnected 0 User is not connected.
 StateConnecting 1 User is connecting.
 StateWaitingUsername 2 User is about to send username.
 StateWaitingPassword 3 User is about to send password
 StateLoggedIn 4 User logged in successfully


Remarks
StateChange event is fired each time user's state changes. From the beginning, when user tries to connect to server, his state will be set to StateConnecting. Once he connects successfully and starts accessing his mail, mostly StateLoggedIn will be set.

Depending on values provided by this event, you can inspect user's behavior on your server, deny access to it or just store it locally for debugging purposes.