Item Property


Returns message with the specified Index from the collection. If Index is out of range, automation error occurs.

This is default property of the Messages collection. The following two statements (assuming Msgs has MailBee.Messages type) are equivalent:

Set Msg = Msgs(1)

and

Set Msg = Msgs.Item(1)


Value Type: MailBee.Message
Parameters:  
Index As Long Index of the message to return. Allowed range is: 1 <= Index <= Messages.Count  
Remarks: This property is read-only

Usage example:

Dim Mailer, Msgs
'Using visual basic to create object
Set Mailer = CreateObject("MailBee.POP3")
'Using ASP to create object
'Set Mailer = Server.CreateObject("MailBee.POP3")
'In ASP use Response.Write instead of MsgBox
Mailer.LicenseKey = "put your license key here"
Mailer.Connect "mailserver.com", 110, "MyName", "MyPassword"
If Mailer.Connected Then
  Set Msgs = Mailer.RetrieveHeaders
  If Msgs.Count > 0 Then
    MsgBox "Subject of the first message: " & Msgs(1).Subject
  End If
  Mailer.Disconnect
End If

See Also:

Count Property
Message Object
Messages Collection
POP3.RetrieveHeaders Method


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