wodSmtpServer ActiveX Control - Item Property
      
 

Description

References specific user currently connected to Smtp server.


Property type

A SmtpUser object.  Reference to requested user.


Syntax

object.Item(Index)



The Item Property syntax has these parts:

Part Description
object An expression evaluating to an object of type SmtpUsers.
Index Required. An Integer value. Index of the user in the collection.

Remarks

This is readonly property that is used to get reference (to access) of some user from collection of all currently connected users. Once user connects to your server, new SmtpUser object will be created and known information will be stored in that object, such as his hostname and time when he connected. Later on, as he issues new commands, more information is stored in that object, such as his username and password (if user provided them).

For instance, to get hostname of first user that connected to your server, you can use code like this:

Debug.Print Smtp.Users.Item(0).HostName

or shorter

Debug.Print Smtp.Users(0).HostName

As you can see, Item keyword can be left out from command because it's default property.

Please note that, unlike other collections in VB, indexes start from 0 and go up to Count-1. So, first user has Index=0 .