|
Summary
Specifies the user permissions of the currently selected mailbox.
Description
The MailboxPermission property contains the mailbox permission that the user has on the currently selected mailbox. If the user is not permitted to modify the mailbox but is permitted read
access then this property will contain IMAP_READ_ONLY value. If the user is permitted to modify the mailbox then this property will contain IMAP_READ_WRITE. If the user selects the mailbox using the
Examine method then the MailboxPermission will be IMAP_READ_ONLY.
If this property is set to IMAP_READ_ONLY then any message manipulation methods can not be used on the mailbox. For example, an error will occur if the Store method is called when the mailbox
permission is read only.
This property is only valid at runtime if the user is logged in and has selected a mailbox. This property should be checked in the OnSelect event. There is no default value for this property.
Example
Private Sub Imap_OnSelect(Buffer As String, Length As Long)
'Delivers selected mailbox info from Select or Examine method
'Notifies that Mailbox properties have been set
Message = "Mailbox Selected:" & Chr(13) & Chr(10)
.
.
If Imap.MailboxPermissions = IMAP_READ_ONLY Then
Message = Message + "Selected with read only permissions." & Chr(13) & Chr(10)
bWrite = False
Else
Message = Message + "Selected with read and write permissions." & Chr(13) & Chr(10)
bWrite = True
End If
MsgBox Message, 64, "IMAP Client Sample"
End Sub
|