Imap.GetMessageHeadersAsync Method
Namespace: Rebex.Net
Assembly: Rebex.Imap.dll (version 7.0.9313)
GetMessageHeadersAsync(Int32, Stream, Object)
Begins asynchronous GetMessageHeaders operation. Downloads the headers of a message with the specified sequence number and writes it into a supplied stream.
Declaration
public Task<long> GetMessageHeadersAsync(int sequenceNumber, Stream output, object state = null)
Parameters
| Type | Name | Description | 
|---|---|---|
| Int32 | sequenceNumber | Message sequence number.  | 
    
| Stream | output | Stream that will receive the message headers.  | 
    
| Object | state | An optional user-provided object that identifies this particular asynchronous operation.  | 
    
Returns
| Type | Description | 
|---|---|
| Task<Int64> | The length of the headers in bytes.  | 
    
Remarks
Uses IMAP FETCH command to retrieve the headers.
GetMessageHeadersAsync(String, Stream, Object)
Begins asynchronous GetMessageHeaders operation. Downloads the headers of a message with the specified unique ID and writes it into a supplied stream.
Declaration
public Task<long> GetMessageHeadersAsync(string uniqueId, Stream output, object state = null)
Parameters
| Type | Name | Description | 
|---|---|---|
| String | uniqueId | Message unique ID.  | 
    
| Stream | output | Stream that will receive the message headers.  | 
    
| Object | state | An optional user-provided object that identifies this particular asynchronous operation.  | 
    
Returns
| Type | Description | 
|---|---|
| Task<Int64> | The length of the headers in bytes.  | 
    
Remarks
Uses IMAP FETCH command to retrieve the headers.