Imap.SelectFolderAsync Method
Namespace: Rebex.Net
Assembly: Rebex.Imap.dll (version 7.0.9083)
SelectFolderAsync(String, Boolean, Object)
Begins asynchronous SelectFolder operation. Selects the specified folder so that its messages can be accessed.
Declaration
public Task SelectFolderAsync(string folder, bool readOnly, object state = null)
Parameters
Type | Name | Description |
---|---|---|
String | folder | Folder to be selected. |
Boolean | readOnly | Specifies whether the folder is to be selected as read-only. |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task |
Remarks
The CurrentFolder property will contain an instance of ImapFolder that represents the selected folder after a call to this method.
Only one mailbox can be selected at a time for a single connection, and only the messages in currently selected folder can be accessed. Also, most notifications only occur when a folder is selected.
This method represents IMAP SELECT and EXAMINE commands.