wodPop3Server ActiveX Control - TestAPOP Method
      
 

Description

Tests password provided by APOP command.


Return Type

Pop3Actions enumeration.  


Syntax

object.TestAPOP Text



The TestAPOP Method syntax has these parts:

Part Description
object An expression evaluating to an object of type Pop3User.
Text Required. A String value. Holds known password you want to check.

Remarks

TestAPOP method will work only inside Connected event, and will test if password you provided is the same as the one provided by the user.

When APOP command is issued, user never sends actual password in cleartext. It is sent hashed together with connection-specific data, so you can only check if password is valid by calling TestAPOP method. If password hash is the same as provided by the user, this method will return Allow. Otherwise returns Deny.

You can typically use this method like this (VB code):

Private Sub Pop3_Connected(ByVal User As WODPOP3SERVERCOMLib.IPop3User, ByVal Username As String, ByVal Password As String, Action As WODPOP3SERVERCOMLib.Pop3Actions)

   Action = Deny
   If Password = "APOP" Then
      If Username = "put_username" Then Action = User.TestAPOP("<put_password>")
   Else
      If Username = "<put_username>" And Password = "<put_password>" Then Action = Allow
   End If

   'let's fill mailbox

   .....

End Sub