RetrieveTotalSize Method


Retrieves the total size (in bytes) of all messages in the currently selected IMAP4 mailbox.


lngSize = ObjectName.RetrieveTotalSize  
Parameters: None 
Return value As Long On success, the total size of all messages in the mailbox. On failure, return value is 0  

Usage example:

' This sample displays total size of Inbox
Dim Mailer
'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
    MsgBox Mailer.RetrieveTotalSize & " bytes"
  End If
  Mailer.Disconnect
End If

See Also:

MessageCount Property

RetrieveMessagesSize Method


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