EnvelopeFlow.Providers.Email.Smtp
0.1.0-alpha.3.1
dotnet add package EnvelopeFlow.Providers.Email.Smtp --version 0.1.0-alpha.3.1
NuGet\Install-Package EnvelopeFlow.Providers.Email.Smtp -Version 0.1.0-alpha.3.1
<PackageReference Include="EnvelopeFlow.Providers.Email.Smtp" Version="0.1.0-alpha.3.1" />
<PackageVersion Include="EnvelopeFlow.Providers.Email.Smtp" Version="0.1.0-alpha.3.1" />
<PackageReference Include="EnvelopeFlow.Providers.Email.Smtp" />
paket add EnvelopeFlow.Providers.Email.Smtp --version 0.1.0-alpha.3.1
#r "nuget: EnvelopeFlow.Providers.Email.Smtp, 0.1.0-alpha.3.1"
#:package EnvelopeFlow.Providers.Email.Smtp@0.1.0-alpha.3.1
#addin nuget:?package=EnvelopeFlow.Providers.Email.Smtp&version=0.1.0-alpha.3.1&prerelease
#tool nuget:?package=EnvelopeFlow.Providers.Email.Smtp&version=0.1.0-alpha.3.1&prerelease
EnvelopeFlow.Providers.Email.Smtp
First-class SMTP delivery through MailKit, usable with Mailgun SMTP, SES SMTP, and other SMTP servers. There is no endpoint, user schema, or conversation-store requirement.
Register with services.AddEnvelopeFlowSmtpEmail(options => { ... }), then inject IEmailTransport. Registration preserves existing application transport and client-factory implementations. Core registration does not require this provider package.
IEmailTransport transport = new SmtpEmailTransport(new SmtpEmailOptions
{
Host = "smtp.example.com",
Username = configuration["Smtp:Username"],
Password = configuration["Smtp:Password"],
});
EmailSubmissionResult result = await transport.SendAsync(new EmailMessage
{
From = new EmailAddress("notifications@example.com", "Example"),
To = [new EmailAddress("recipient@example.com")],
Subject = "Your update",
TextBody = "Your update is ready.",
HtmlBody = "<p>Your update is ready.</p>",
}, cancellationToken);
StartTls is required by default, with platform certificate validation. SslOnConnect supports implicit TLS. Explicit None supports unauthenticated local test servers; credentials are refused without TLS. The transport snapshots and validates options at construction.
Each call opens one connection and makes one submission attempt. Acknowledged SMTP acceptance remains accepted if disconnect/disposal fails. Network interruption or cancellation during submission returns Unknown with ReviewBeforeRetry; earlier caller cancellation throws. The result never exposes exception text, SMTP reply text, credentials, or message contents. Explicit SMTP rejections distinguish 4xx retry advice from 5xx permanent refusal. Connection establishment failures can be retried; authentication and TLS configuration failures require correction.
The supplied MailKit adapter preserves explicit SMTP 530 authentication-required replies as definite rejection, including replies at MAIL, RCPT or the final DATA response. A missing final response remains uncertain. Ordinary exceptions from replaceable clients retain conservative submission semantics; only the real adapter marks this known negative reply. See MailKit's tagged reply handling and RFC 4954 status codes.
Accepted and Unknown results carry the generated Message-Id (no angle brackets) as ProviderMessageId; record it to thread later replies. Reply threading uses ordinary In-Reply-To and References extension headers. Messages support multipart alternatives, Cc/Bcc, reply-to, repeated extension headers, and in-memory attachments. Structured MIME headers must use their typed fields; raw routing/content headers are refused. Applications own attachment size limits, consent, scheduling, recipient fan-out, and durable state. Sending a multi-recipient message is one submission, with no per-recipient receipt claims.
ISmtpEmailClientFactory allows fake connections or a custom MailKit wrapper for testing. Optional PooledSmtpEmailTransport and services.AddEnvelopeFlowPooledSmtpEmail(...) reuse a bounded number of exclusively owned connections, limit messages/idle time, and discard failed or uncertain sessions without resending. Dispose the pool at host shutdown; the DI singleton is disposed with the container. Tests include a real MailKit pooled connection sending three messages through one handshake against an unauthenticated loopback SMTP fixture.
The supplied MailKit adapter requires negotiated SMTPUTF8 and 8BITMIME when an address local-part needs UTF-8, including header-only addresses such as Reply-To. Unsupported sessions reject with Configuration before issuing MAIL FROM; supported sessions declare SMTPUTF8 for both international envelopes and headers. Unicode display names and IDN domains remain usable on legacy servers through MIME encoding and Punycode. Loopback tests exercise these negotiated behaviors for standalone and pooled clients. Real-provider compatibility certification remains a deployment check; no external credentials are used in automated tests.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- EnvelopeFlow.Core (>= 0.1.0-alpha.3.1)
- EnvelopeFlow.Email.Abstractions (>= 0.1.0-alpha.3.1)
- MailKit (>= 5.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-alpha.3.1 | 45 | 11/22/2026 |
| 0.1.0-alpha.2.1 | 58 | 11/9/2026 |