OnReceiveComplete Event


Fires when POP3 object has received message data from POP3 server. After firing this event POP3 object will decode the message from MIME format.


Parameters:  
Index As Long Index of the message being retrieved. Allowed range is: 1 <= Index <= POP3.MessageCount  
ByRef Proceed As Boolean Default value is True, which tells MailBee to start decoding message data. You can set it to False to immediately abort POP3 session and disconnect from POP3 server  
Remarks: Events are turned off by default. To enable them, set EnableEvents to True

Usage example:

Option Explicit
Dim WithEvents objPOP3 As MailBee.POP3

Private Sub Form_Load()
  Dim Msgs As MailBee.Messages
  Set objPOP3 = New MailBee.POP3
  objPOP3.LicenseKey = "put your license key here"
  objPOP3.EnableEvents = True
  If objPOP3.Connect ("mailserver.com", 110, "MyName", "MyPassword") Then
    Set Msgs = objPOP3.RetrieveHeaders
    objPOP3.Disconnect
  End If
End Sub

Private Sub objPOP3_OnReceiveComplete(ByVal Index As Long, Proceed As Boolean)
  ' Abort pop3 session if there are more than 100 messages in the mailbox
  If Index > 100 Then Proceed = False 
End Sub

See Also:

EnableEvents Property
OnReceiveStart Event
OnReceiveProgress Event
OnMessageComplete Event


Copyright © 2002-2022, AfterLogic Corporation. All rights reserved.