wodImapServer ActiveX Component - Connecting Method
      
 

Description

Called when new user is connecting to server.


Return Type

None  


Syntax

object.Connecting Owner, User, Action



The Connecting Method syntax has these parts:

Part Description
object An expression evaluating to an object of type IwodImapNotify.
Owner Required. A wodImapServer object.
User Required. An ImapUser object. Reference to user that wants to connect to your IMAP server.
Action Required. An ImapActions enumeration, as described in settings. Return value you should fill with either Allow or Deny value, depending if you will allow user to access server or not.

Settings

The settings for Action are:

Constant Value Description
 Deny 0 Deny execution of the action.
 Allow 1 Allow to execute action.

Remarks
NOTE: This method is called only if you implemented IwodImapNotify interface in your application, and wodImapServer1.Notification property has received reference to instance of your implementation.
 
At the time this notification method is called, no commands are entered by user. Only his Hostname and TimeConnected properties are known to IMAP server. Server will call this notification method so you can decide if you will let user access your server at all. This is very handy if you want to perform IP filter checking on your server, thus allowing only specific range of IP addresses to access server. After you check user's Hostname property, set Action = Allow to let him continue using the server, or Action = Deny to close connection without any response made by your server. You can prevent potential hackers or attackers this way.