Imap.GetMessagePartAsync Method
Namespace: Rebex.Net
Assembly: Rebex.Imap.dll (version 7.0.9119)
GetMessagePartAsync(Int32, String, Object)
Begins asynchronous GetMessagePart operation. Downloads the specified part of the message. Used to download separate attachments. Call GetMessageInfo(String, ImapListFields) with ImapListFields.MessageStructure argument to download the list of sections and access it using GetParts() method.
Declaration
public Task<byte[]> GetMessagePartAsync(int sequenceNumber, string partId, object state = null)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sequenceNumber | Message sequence number. |
String | partId | Message section (from Id). |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task<Byte[]> | Raw data of the specified message section. |
GetMessagePartAsync(String, String, Object)
Begins asynchronous GetMessagePart operation. Downloads the specified part of the message. Used to download separate attachments. Call GetMessageInfo(String, ImapListFields) with ImapListFields.MessageStructure argument to download the list of sections and access it using GetParts() method.
Declaration
public Task<byte[]> GetMessagePartAsync(string uniqueId, string partId, object state = null)
Parameters
Type | Name | Description |
---|---|---|
String | uniqueId | Message unique ID. |
String | partId | Message section (from Id). |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task<Byte[]> | Raw data of the specified message section. |
GetMessagePartAsync(Int32, String, Stream, Object)
Begins asynchronous GetMessagePart operation. Downloads the specified part of the message into the specified stream. Used to download separate attachments. Call GetMessageInfo(String, ImapListFields) with ImapListFields.MessageStructure argument to download the list of sections and access it using GetParts() method.
Declaration
public Task GetMessagePartAsync(int sequenceNumber, string partId, Stream output, object state = null)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sequenceNumber | Message sequence number. |
String | partId | Message section (from Id). |
Stream | output | Stream that will receive the part data. |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task |
GetMessagePartAsync(String, String, Stream, Object)
Begins asynchronous GetMessagePart operation. Downloads the specified part of the message into the specified stream. Used to download separate attachments. Call GetMessageInfo(String, ImapListFields) with ImapListFields.MessageStructure argument to download the list of sections and access it using GetParts() method.
Declaration
public Task GetMessagePartAsync(string uniqueId, string partId, Stream output, object state = null)
Parameters
Type | Name | Description |
---|---|---|
String | uniqueId | Message unique ID. |
String | partId | Message section (from Id). |
Stream | output | Stream that will receive the part data. |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task |