Pop3.GetMessageAsync Method
Namespace: Rebex.Net
Assembly: Rebex.Pop3.dll (version 7.0.9083)
GetMessageAsync(Int32, Stream, Object)
Begins asynchronous GetMessage operation. Downloads the message with a specified number from the server and writes its data into a supplied stream.
Declaration
public Task<long> GetMessageAsync(int sequenceNumber, Stream output, object state = null)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sequenceNumber | The sequence number of the message to download. |
Stream | output | Stream that will receive the message. |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task<Int64> | The length of the message in bytes. |
Remarks
Represents POP3 RETR command.
GetMessageAsync(Int32, String, Object)
Begins asynchronous GetMessage operation. Downloads the message with a specified number from the server and writes its data into a local file.
Declaration
public Task<long> GetMessageAsync(int sequenceNumber, string fileName, object state = null)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sequenceNumber | The sequence number of the message to download. |
String | fileName | The path of the local file. This cannot be a directory. |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task<Int64> | The length of the message in bytes. |
Remarks
Represents POP3 RETR command.