Rebex
Products Downloads Buy Support Contact
Show / Hide Table of Contents

Imap.GetMessagePartAsync Method

Namespace: Rebex.Net
Assembly: Rebex.Imap.dll (version 7.0.9147)

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
In This Article
  • GetMessagePartAsync(Int32, String, Object)
  • GetMessagePartAsync(String, String, Object)
  • GetMessagePartAsync(Int32, String, Stream, Object)
  • GetMessagePartAsync(String, String, Stream, Object)
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies