OnClientConnect(oClient as hMailServer.Client)
This event is fired directly after a TCP/IPÂ connection has been opened towards hMailServer. The event is fired before the user has logged on, which means that the oClient.Username property will return an empty string.
VB-script:
Sub OnClientConnect(oClient) Result.Value = 0 If oClient.Port = 25 Then If StrComp("127.0.0.0", "127.0.0.1") Then ' We only allow SMTP connections from local host. Result.Value = 1 End if End If End Sub