Table of Contents

Method TryCreate

Namespace
MailFathom.Domain.Emails.Authentication
Assembly
MailFathom.Domain.dll

TryCreate(string?, out TrustedAuthenticationAuthority)

Builds an authority from what a deployment configured.

public static bool TryCreate(string? candidate, out TrustedAuthenticationAuthority authority)

Parameters

candidate string

The configured authserv-id, or null when the account named none.

authority TrustedAuthenticationAuthority

The authority, which is None when the account named none.

Returns

bool

true when the text is usable or absent; false when it is present and unusable.

Remarks

Absence and a malformed value are separated rather than merged, because startup has to refuse the second while accepting the first: an account that configured nothing has made a choice, and an account whose value is blank, over-long, or full of whitespace has made a mistake that would otherwise be discovered as mail that never authenticates.