Table of Contents

Method ToRemotePath

Namespace
MailFathom.Domain.Folders
Assembly
MailFathom.Domain.dll

ToRemotePath(MailFolderAlias, RemoteFolderPath, MailFolderParticipation?, bool, MailFolderSpecialUse?)

Maps an alias onto the server-advertised path an operator wrote.

public static MailFolderMapping ToRemotePath(MailFolderAlias alias, RemoteFolderPath remotePath, MailFolderParticipation? participation = null, bool mayCreateMissingFolder = false, MailFolderSpecialUse? specialUse = null)

Parameters

alias MailFolderAlias

The operator-facing folder name.

remotePath RemoteFolderPath

The remote path the alias names.

participation MailFolderParticipation

How far the folder is admitted, or null for a folder that takes part in everything.

mayCreateMissingFolder bool

Whether the folder may be created when the server advertises none at that path.

specialUse MailFolderSpecialUse?

The role the folder plays, or null for a folder configuration labels with none.

Returns

MailFolderMapping

A mapping resolved by matching the advertised path.

Remarks

The role is a label here rather than the way the folder is found, which is why it may be given to a folder whose server advertises no attribute for it at all. Discovery still matches the configured path, so labelling a folder never changes which remote folder the alias binds to.

Exceptions

ArgumentOutOfRangeException

Thrown when specialUse is not a defined role.