Count Property
Returns the number of BodyPartStructure objects in the collection.
Value Type: | Long | |
Parameters: | None | |
Remarks: | This property is read-only |
Usage example:
' This sample displays the number of sub parts of main MIME part of the first email in Inbox Dim Mailer, Envelope, 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.RetrieveEnvelopesEx(1, 1, False, True) If Not Envelopes Is Nothing Then For Each Envelope In Envelopes If Envelope.BodyStructure.IsMultipart Then MsgBox Envelope.BodyStructure.SubParts.Count & " parts" Else MsgBox "1 part" End If Next End If End If Mailer.Disconnect End If
See Also:
Item
Property
BodyPartStructure Object
Mailboxes Collection
Copyright © 2002-2024, AfterLogic Corporation. All rights reserved.