PouryaKit
ReferencePackages

PouryaKit.Email.MailKit

The Host's SMTP sender on MailKit.

The Host's SMTP sender on MailKit. It supplies IEmailSender of PouryaKit.Email from options the Host checks before it serves, so a Module references only the contract and never names MailKit.

Install

dotnet add package PouryaKit.Email.MailKit --prerelease

When to use it

  • A Host sends the mail its Modules ask for.
  • You configure the Host's SMTP server and sender address.
  • You test mail against a Papercut container.

It implements PouryaKit.Email. A Host composes exactly one sender.

Quick start

Register it in the Host and bind its options from configuration, as the Proving Sample does:

builder.Services.AddPouryaKitMailKit();
builder.Services.Configure<PouryaKitMailKitOptions>(
    builder.Configuration.GetSection("PouryaKit:Email")
);

What you get

  • The contract of IEmailSender on MailKit.
  • Options checked before the Host serves, not at the first send.
  • A Host that fails when it is built unless it composes exactly one sender.

The server's acceptance is not guaranteed, and a send that succeeded may repeat: what the Kit guarantees.

Learn more

On this page