|
Summary
Returns a list of message sequence numbers that meet the Search specifications in a Search or UidSearch method.
Description
The OnSearch event occurs in response to calling the Search or UidSearch method. If there are any messages that match the searching criteria then the OnSearch event delivers the message
numbers. If the Search method was called this event will deliver the message sequence numbers; if the UidSearch was called this event will deliver the message uid numbers of the matching messages.
The Buffer parameter will contain the message numbers separated by spaces and Length parameter will specify the length of the buffer. If no messages were found that matched the
searching criteria then the buffer will be empty and the Length parameter will be set to 0.
Exampl e
Private Sub Imap_OnSearch(Buffer As String, Length As Long)
'Delivers message numbers that matched search criteria
If (Length = 0) Then
Message = "No messages found that matched criteria."
Else
Message = "Search successful on messages: " + Buffer
End If
MsgBox Message, 64, "IMAP Client Sample"
End Sub
|