Mailbox Object
The Mailbox object contains 
  properties used to examine a mailbox on the IMAP4 server.
  
  Individual Mailbox objects can be accessed by iterating through the Mailboxes 
  collection returned by RetrieveMailboxes 
  method of the IMAP4 object.
Syntax
Mailbox.property
| Properties | |
| Delimiter | The character that is used as hierarchy delimiter of mailbox levels. | 
| Flags | Flags which set for the mailbox. | 
| Name | Name of the mailbox. | 
| OriginalName | Gets the original mailbox name as it's provided by the IMAP server (not decoded from UTF-7M). | 
Example
The following example displays names of all mailboxes available in the user account.Dim objIMAP4, objMailboxes, objMailbox ' Using Visual Basic to create object Set objIMAP4 = CreateObject("MailBee.IMAP4") ' Using ASP to create object ' Set objIMAP4 = Server.CreateObject("MailBee.IMAP4") ' Unlock IMAP4 object objIMAP4.LicenseKey = "put your license key here" ' Set IMAP4 server name objIMAP4.ServerName = "mail.server.com" ' Set user credentials objIMAP4.UserName = "jdoe" objIMAP4.Password = "secret" ' Connect to the server and ' log in email account If objIMAP4.Connect Then ' Download list of mailboxes Set objMailboxes = objIMAP4.RetrieveMailboxes ' Check for errors If Not objIMAP4.IsError Then For Each objMailbox In objMailboxes ' Display name of each mailbox MsgBox "Name = " & objMailbox.Name ' In ASP, use Response.Write instead of MsgBox Next End If ' Close the connection objIMAP4.Disconnect End If
See Also
Mailboxes Collection, IMAP4.RetrieveMailboxes Method