Item Property
Returns an Envelope
object from the collection.
Index parameter specifies the index of the mailbox in the collection.
If Index is out of range, automation error occurs.
Item is the default property of the collection. The following two statements
(assuming Envelopes has MailBee.Envelopes type) are equivalent:
Set Envelope = Envelopes(1)
and
Set Envelope = Envelopes.Item(1)
Value Type: | MailBee.Envelope | |
Parameters: | ||
Index As Long | Index of the mailbox to return. Allowed range is: 1 <= Index <= Envelopes.Count | |
Remarks: | This property is read-only |
Usage example:
' This sample displays Subject for the first message in the collection Dim Mailer, Envelopes 'Using visual basic to create object Set Mailer = CreateObject("MailBee.IMAP4") 'Using ASP to create object 'Set Mailer = Server.CreateObject("MailBee.IMAP4") 'In ASP use Response.Write instead of MsgBox Mailer.EnableLogging = True Mailer.LogFilePath = "C:\Temp\imap4_log.txt" Mailer.ClearLog Mailer.LicenseKey = "put your license key here" If Mailer.Connect("mailserver.com", 143, "MyName", "MyPassword") Then If Mailer.SelectMailbox("Inbox") Then Set Envelopes = Mailer.RetrieveEnvelopes(1, 1, False) If Not Envelopes Is Nothing Then If Envelopes.Count > 0 Then MsgBox Envelopes(1).Subject End If End If End If Mailer.Disconnect End If
See Also:
Count
Property
Mailbox Object
Mailboxes Collection
Copyright © 2002-2024, AfterLogic Corporation. All rights reserved.