Table of Contents

Method AddEmailEnrichmentAgent

Namespace
MailFathom.AI
Assembly
MailFathom.AI.dll

AddEmailEnrichmentAgent(IServiceCollection, bool)

Registers the one way a message becomes the marks a list row draws, in whichever of its two states the deployment is in.

public static IServiceCollection AddEmailEnrichmentAgent(this IServiceCollection services, bool isActivated)

Parameters

services IServiceCollection

The service collection to add to.

isActivated bool

Whether the deployment declared a chat endpoint and asked for its mail to be enriched.

Returns

IServiceCollection

The same service collection, so registration reads as one expression.

Remarks

Called unconditionally and always registering something, which it shares with image description and for the same reason: the port answers with a reason rather than with an absence, so the arrival pass records why a message carries no marks without knowing what a deployment declared.

Which of the two is registered is decided once, at composition. An instance that has not activated enrichment never resolves a chat client, never opens a transport, and never composes a turn: the activation is a registration rather than a branch inside a call, so there is no path by which a message leaves an instance whose operator did not ask for it.

Scoped when it is active, because the account run makes one scope per pass and the agent's ledger, credential, and transport belong to that pass. The inactive one is a singleton holding nothing.

Exceptions

ArgumentNullException

Thrown when services is null.