Flags Property


Contains flags which are set for the mailbox.

This can be zero, or any combination of the following values:

Note: special folder flags (\Inbox, \Drafts, \Sent, \Spam, \Trash, etc) can only be returned if the server supports XLIST or SPECIAL-USE extensions. \HasChildren and \HasNoChildren flags - if the server supports CHILDREN extension. See RetrieveMailboxesEx method for details.


Value Type: Long
Parameters: None 
Remarks: This property is read-only

Usage example:

' This sample prints all flags of the first mailbox in the IMAP4 account
Dim Mailer, Mailboxes, Flags
'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
  Set Mailboxes = Mailer.RetrieveMailboxes
  If Not Mailboxes Is Nothing Then
    If Mailboxes.Count > 0 Then
      Flags = Mailboxes(1).Flags
      If (Flags And 1) = 1 Then MsgBox "\Noinferiors flag set"
      If (Flags And 2) = 2 Then MsgBox "\Noselect flag set"
      If (Flags And 4) = 4 Then MsgBox "\Marked flag set"
      If (Flags And 8) = 8 Then MsgBox "\Unmarked flag set"
      If (Flags And 16) = 16 Then MsgBox "\Inbox flag set"
      If (Flags And 32) = 32 Then MsgBox "\Drafts flag set"
      If (Flags And 64) = 64 Then MsgBox "\Sent flag set"
      If (Flags And 128) = 128 Then MsgBox "\Spam flag set"
      If (Flags And 256) = 256 Then MsgBox "\Trash flag set"
    End If
  End If
  Mailer.Disconnect
End If

See Also:

Name Property


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