OnReceiveStart Event
Fires when POP3 object is going to start retrieving message or message headers.
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 receiving 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_OnReceiveStart(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
OnReceiveProgress Event
OnReceiveComplete Event
OnMessageComplete Event
Copyright © 2002-2024, AfterLogic Corporation. All rights reserved.