Piton.Emailing.Domain.Shared
1.4.0
dotnet add package Piton.Emailing.Domain.Shared --version 1.4.0
NuGet\Install-Package Piton.Emailing.Domain.Shared -Version 1.4.0
<PackageReference Include="Piton.Emailing.Domain.Shared" Version="1.4.0" />
<PackageVersion Include="Piton.Emailing.Domain.Shared" Version="1.4.0" />
<PackageReference Include="Piton.Emailing.Domain.Shared" />
paket add Piton.Emailing.Domain.Shared --version 1.4.0
#r "nuget: Piton.Emailing.Domain.Shared, 1.4.0"
#:package Piton.Emailing.Domain.Shared@1.4.0
#addin nuget:?package=Piton.Emailing.Domain.Shared&version=1.4.0
#tool nuget:?package=Piton.Emailing.Domain.Shared&version=1.4.0
Piton.Emailing
Reusable ABP Framework email module. EmailManager delegates message delivery to the package-owned
MailKit sender. The package supports regular SMTP credentials and Gmail SMTP XOAUTH2.
The host supplies only the IEmailSecretStore integration (Vault, Key Vault, or another secret store)
and deploy-time options. SMTP passwords, Google client secrets, refresh tokens, and access tokens never
appear in DTOs or status responses.
Packages
| Package | Contains |
|---|---|
Piton.Emailing.Domain.Shared |
Localization, exception codes, provider enums/options, shared constants |
Piton.Emailing.Domain |
EmailManager, provider manager/contracts/models, message models, IEmailSecretStore |
Piton.Emailing.Infrastructure |
MailKit SMTP/Gmail XOAUTH2 transport, OAuth gateway, typed options binding |
Piton.Emailing.Application.Contracts |
Send/provider DTOs, validators, IEmailAppService, IEmailProviderAppService |
Piton.Emailing.Application |
Email/provider AppServices and Mapperly mappers |
Piton.Emailing.HttpApi |
POST /api/emailing/emails generic send endpoint |
Install
Reference the layers hosted by the application:
<PackageReference Include="Piton.Emailing.Domain" Version="1.1.0" />
<PackageReference Include="Piton.Emailing.Infrastructure" Version="1.1.0" />
<PackageReference Include="Piton.Emailing.Application" Version="1.1.0" />
<PackageReference Include="Piton.Emailing.HttpApi" Version="1.1.0" />
Add the matching module dependencies:
[DependsOn(typeof(EmailingDomainModule))]
[DependsOn(typeof(EmailingInfrastructureModule))]
[DependsOn(typeof(EmailingApplicationModule))]
[DependsOn(typeof(EmailingHttpApiModule))] // optional
Configuration
The infrastructure module binds the typed Piton:Emailing section:
{
"Piton": {
"Emailing": {
"Provider": "GmailOAuth2",
"FromAddress": "noreply@example.com",
"FromDisplayName": "Example",
"SmtpHost": "smtp.gmail.com",
"SmtpPort": 587,
"SmtpSecurity": "StartTls",
"GoogleClientId": "...",
"GoogleRedirectUri": "https://app.example.com/api/email/platform/google/callback",
"GoogleScope": "https://mail.google.com/",
"SecretPath": "platform/email"
}
}
}
The host implements Piton.Emailing.Interface.Emailing.IEmailSecretStore. The package never assumes
Vault or another concrete secret provider.
Internal send
Inject EmailManager in a domain manager or application background job:
await _emailManager.SendAsync(new EmailMessageModel
{
To = { new EmailAddressModel { Address = "ops@example.com", Name = "Ops" } },
Subject = "Schema comparison finished",
Body = "<h1>3 differences found</h1>",
IsHtml = true
});
The generic HTTP endpoint is optional. If it is hosted, protect it with the consuming application's authorization policy; report/password-reset emails should normally use the internal manager path.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.FileProviders.Embedded (>= 10.0.7)
- Volo.Abp.Ddd.Domain.Shared (>= 10.3.0)
- Volo.Abp.Validation (>= 10.3.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Piton.Emailing.Domain.Shared:
| Package | Downloads |
|---|---|
|
Piton.Emailing.Domain
Reusable ABP email module: a thin EmailManager over ABP's MailKit-backed IEmailSender for sending HTML/text e-mails with attachments. |
|
|
Piton.Emailing.Application.Contracts
Reusable ABP email module: a thin EmailManager over ABP's MailKit-backed IEmailSender for sending HTML/text e-mails with attachments. |
GitHub repositories
This package is not used by any popular GitHub repositories.