Table of Contents

Interface IMailDeliverySessionFactory

Namespace
MailFathom.Application.Mail.Delivery
Assembly
MailFathom.Application.dll

Opens the one session in MailFathom able to reach a submission server.

public interface IMailDeliverySessionFactory

Remarks

It is a separate factory from every mailbox session factory rather than a second method on one, because the separation is what the guarantee rests on: a component that never takes this dependency cannot obtain a session that sends, whatever a later change does inside it.

Nothing is pooled. A mailbox session is held open because a run reads a folder many times, while a submission is one exchange whose failure must never be repeated on a caller's behalf, so each delivery opens its own connection and closes it. That also keeps a submission endpoint from counting a MailFathom deployment as a permanently connected client.

Methods

OpenForDeliveryAsync(MailAccountId, MailTransportSecurityPolicy, CancellationToken)

Connects and authenticates against the account's submission server.