ImapClient.FetchMessageAsync

FetchMessageAsync(IConnection, int)

Fetches the message

public Task<MailMessage> FetchMessageAsync(IConnection connection, int sequenceNumber)
ParameterTypeDescription
connectionIConnectionConnection to a server
sequenceNumberInt32The sequence number of message

Return Value

Task object, with delegate for this operation

See Also


FetchMessageAsync(IConnection, int, bool)

Fetches the message

public Task<MailMessage> FetchMessageAsync(IConnection connection, int sequenceNumber, 
    bool ignoreAttachment)
ParameterTypeDescription
connectionIConnectionConnection to a server
sequenceNumberInt32The sequence number of message
ignoreAttachmentBooleanA value that defines whether the attachments should not be loaded. If it is set to true, then only message headers, message body and attachment information are fetched. Attachment content is not loaded

Return Value

Task object, with delegate for this operation

See Also


FetchMessageAsync(int)

Fetches the message

public Task<MailMessage> FetchMessageAsync(int sequenceNumber)
ParameterTypeDescription
sequenceNumberInt32The sequence number of message

Return Value

Task object, with delegate for this operation

See Also


FetchMessageAsync(int, bool)

Fetches the message

public Task<MailMessage> FetchMessageAsync(int sequenceNumber, bool ignoreAttachment)
ParameterTypeDescription
sequenceNumberInt32The sequence number of message
ignoreAttachmentBooleanA value that defines whether the attachments should not be loaded. If it is set to true, then only message headers, message body and attachment information are fetched. Attachment content is not loaded

Return Value

Task object, with delegate for this operation

See Also


FetchMessageAsync(IConnection, string)

Fetches the message

public Task<MailMessage> FetchMessageAsync(IConnection connection, string uniqueId)
ParameterTypeDescription
connectionIConnectionConnection to a server
uniqueIdStringThe unique id of message

Return Value

Task object, with delegate for this operation

See Also


FetchMessageAsync(string)

Fetches the message

public Task<MailMessage> FetchMessageAsync(string uniqueId)
ParameterTypeDescription
uniqueIdStringThe unique id of message

Return Value

Task object, with delegate for this operation

See Also


FetchMessageAsync(IConnection, int, CancellationToken)

Fetches the message

public Task<MailMessage> FetchMessageAsync(IConnection connection, int sequenceNumber, 
    CancellationToken token)
ParameterTypeDescription
connectionIConnectionConnection to a server
sequenceNumberInt32The sequence number of message
tokenCancellationTokenPropagates notification that operations should be canceled.

Return Value

Task object, with delegate for this operation

See Also


FetchMessageAsync(IConnection, int, bool, CancellationToken)

Fetches the message

public Task<MailMessage> FetchMessageAsync(IConnection connection, int sequenceNumber, 
    bool ignoreAttachment, CancellationToken token)
ParameterTypeDescription
connectionIConnectionConnection to a server
sequenceNumberInt32The sequence number of message
ignoreAttachmentBooleanA value that defines whether the attachments should not be loaded. If it is set to true, then only message headers, message body and attachment information are fetched. Attachment content is not loaded
tokenCancellationTokenPropagates notification that operations should be canceled.

Return Value

Task object, with delegate for this operation

See Also


FetchMessageAsync(int, CancellationToken)

Fetches the message

public Task<MailMessage> FetchMessageAsync(int sequenceNumber, CancellationToken token)
ParameterTypeDescription
sequenceNumberInt32The sequence number of message
tokenCancellationTokenPropagates notification that operations should be canceled.

Return Value

Task object, with delegate for this operation

See Also


FetchMessageAsync(int, bool, CancellationToken)

Fetches the message

public Task<MailMessage> FetchMessageAsync(int sequenceNumber, bool ignoreAttachment, 
    CancellationToken token)
ParameterTypeDescription
sequenceNumberInt32The sequence number of message
ignoreAttachmentBooleanA value that defines whether the attachments should not be loaded. If it is set to true, then only message headers, message body and attachment information are fetched. Attachment content is not loaded
tokenCancellationTokenPropagates notification that operations should be canceled.

Return Value

Task object, with delegate for this operation

See Also


FetchMessageAsync(IConnection, string, CancellationToken)

Fetches the message

public Task<MailMessage> FetchMessageAsync(IConnection connection, string uniqueId, 
    CancellationToken token)
ParameterTypeDescription
connectionIConnectionConnection to a server
uniqueIdStringThe unique id of message
tokenCancellationTokenPropagates notification that operations should be canceled.

Return Value

Task object, with delegate for this operation

See Also


FetchMessageAsync(string, CancellationToken)

Fetches the message

public Task<MailMessage> FetchMessageAsync(string uniqueId, CancellationToken token)
ParameterTypeDescription
uniqueIdStringThe unique id of message
tokenCancellationTokenPropagates notification that operations should be canceled.

Return Value

Task object, with delegate for this operation

See Also