MailboxStatus Object

The MailboxStatus object contains properties used to examine a mailbox statistics on the IMAP4 server.

You can get this object using GetMailboxStatus method of the IMAP4 object.

Syntax

MailboxStatus.property

 

Properties
MessageCount Number of all messages in the mailbox.
Name Name of the mailbox.
OriginalName The original mailbox name as it's provided by the IMAP server (not decoded from UTF-7M).
RecentCount Number of recent messages in the mailbox.
UIDNext Next predicted UID value in the mailbox.
UIDValidity UIDVALIDITY value of the mailbox.
UnseenCount Number of unread messages in the mailbox.

 

Example

This sample retrieves and displays all the stats of Inbox.
Dim Mailer, Stats
'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("mail.server.com", 143, "MyName", "MyPassword") Then
  Set Stats = Mailer.GetMailboxStatus("Inbox")
  If Not Stats Is Nothing Then
    MsgBox "MessageCount=" & Stats.MessageCount & " RecentCount=" & Stats.RecentCount & " UnseenCount=" & Stats.UnseenCount
    MsgBox "UIDValidity=" & Stats.UIDValidity & " UIDNext=" & Stats.UIDNext
  End If
  Mailer.Disconnect
End If

 

See Also

GetMailboxStatus Method

 


Send feedback to AfterLogic
Copyright © 2002-2024, AfterLogic Corporation. All rights reserved.