Table of Contents

Method WriteMessageAsync

Namespace
MailFathom.Application.Mail.Export
Assembly
MailFathom.Application.dll

WriteMessageAsync(string, ExportableMessage, ReadOnlyMemory<byte>, long, CancellationToken)

Writes one message into its folder's Maildir, exactly as it is stored.

public Task<string> WriteMessageAsync(string folderDirectory, ExportableMessage message, ReadOnlyMemory<byte> rawMime, long ordinal, CancellationToken cancellationToken)

Parameters

folderDirectory string

What OpenFolder(MailboxExportFolder) answered for the folder the message is in.

message ExportableMessage

The message, which supplies its arrival, its length, its flags, and its keywords.

rawMime ReadOnlyMemory<byte>

The stored bytes, written through unchanged.

ordinal long

The message's position in this export, which makes its file name unique.

cancellationToken CancellationToken

Cancels the write.

Returns

Task<string>

The path the message was written at.

Exceptions

ArgumentNullException

Thrown when message is null.