Imap.SendCommandAsync Method
Namespace: Rebex.Net
Assembly: Rebex.Imap.dll (version 7.0.9083)
SendCommandAsync(String, Object[], Object)
Begins asynchronous SendCommand operation. Executes a command on the IMAP server.
Declaration
public Task SendCommandAsync(string command, object[] parameters, object state = null)
Parameters
Type | Name | Description |
---|---|---|
String | command | Command (e.g. "CAPABILITY"). |
Object[] | parameters | List of parameters. Allowed types are String and a byte array. |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task |
Remarks
The specified string parameters are send as is. It is caller's responsibility to properly format the parameters.
The specified byte array parameters are send as literals - binary blocks of data.
To use this method properly, some understanding of the IMAP protocol is strongly recommended.
A call to SendCommand MUST be followed by a call to ReadResponse method.
Use ReadResponse and SendCommand to implement various custom commands.