wodSmtpServer ActiveX Control - Hostname Property
      
 

Description

Holds hostname of connected user.


Property type

A String value.  


Syntax

object.Hostname [= value]



The Hostname Property syntax has these parts:

Part Description
object An expression evaluating to an object of type SmtpUser.
value A String value.

Remarks

Hostname property provides you with IP address of user's originating host. Using this value you can filter incoming connections and allow only specific IP range or domain that are allowed to connect to your server. Once user connects and Connecting event is fired, User.Hostname is already filled with information and you can test it against some filter of your choice.

Although Hostname property is expected to be readonly, it's not. You can write your own value into it in case it will provide easier accessing them later on. For instance, if you want to reference range of IPs to some name of your choice, you can set it up to 'friends' during Connecting event, and then just test against this value later, or add 'on-the-fly' new messages to their mailboxes.