Tolitech.Application.Mail
1.0.0-preview.4
dotnet add package Tolitech.Application.Mail --version 1.0.0-preview.4
NuGet\Install-Package Tolitech.Application.Mail -Version 1.0.0-preview.4
<PackageReference Include="Tolitech.Application.Mail" Version="1.0.0-preview.4" />
<PackageVersion Include="Tolitech.Application.Mail" Version="1.0.0-preview.4" />
<PackageReference Include="Tolitech.Application.Mail" />
paket add Tolitech.Application.Mail --version 1.0.0-preview.4
#r "nuget: Tolitech.Application.Mail, 1.0.0-preview.4"
#:package Tolitech.Application.Mail@1.0.0-preview.4
#addin nuget:?package=Tolitech.Application.Mail&version=1.0.0-preview.4&prerelease
#tool nuget:?package=Tolitech.Application.Mail&version=1.0.0-preview.4&prerelease
Tolitech.Application.Mail
Overview
Tolitech.Application.Mail is a modern .NET library that provides essential interfaces and utilities for sending emails asynchronously in applications. Designed for flexibility and extensibility, it enables developers to implement custom email delivery solutions while maintaining a clean and testable architecture.
Features
- IEmailServiceBase Interface: Defines a contract for sending emails asynchronously, supporting sender, recipient, CC, and BCC addresses.
- Extensibility: Easily integrate with any email provider by implementing the interface in your infrastructure layer.
- Clean Architecture Alignment: Promotes separation between application, domain, and infrastructure layers.
- Testability: Facilitates mocking and unit testing of email sending logic.
Main Interface
IEmailServiceBase
public interface IEmailServiceBase
{
Task SendEmailAsync(
string recipient,
string subject,
string content,
string? from = null,
string? cc = null,
string? bcc = null
);
}
Parameters
recipient
: The recipient's email address.subject
: The subject of the email.content
: The content of the email (plain text or HTML).from
: The sender's email address. If null, the default sender address will be used.cc
: Email address(es) to be copied (CC). If null, no CC will be sent.bcc
: Email address(es) to be blind copied (BCC). If null, no BCC will be sent.
Returns
- A
Task
representing the asynchronous email sending operation.
Example Usage
public class SmtpEmailService : IEmailServiceBase
{
public async Task SendEmailAsync(string recipient, string subject, string content, string? from = null, string? cc = null, string? bcc = null)
{
// Implement SMTP logic here
}
}
How to Integrate
- Reference Tolitech.Application.Mail in your project.
- Implement the
IEmailServiceBase
interface in your infrastructure layer. - Inject your implementation into your application services.
- Use the interface to send emails asynchronously.
Summary
Tolitech.Application.Mail simplifies the process of sending emails in .NET applications, providing a clean, extensible, and testable foundation for email delivery logic.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net9.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Tolitech.Application.Mail:
Package | Downloads |
---|---|
Tolitech.Infrastructure.Mail
A library providing essential utilities for sending emails asynchronously. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.0.0-preview.4 | 436 | 7/21/2025 |
1.0.0-preview.3 | 122 | 7/3/2025 |
1.0.0-preview.2 | 100 | 12/14/2024 |
1.0.0-preview.1 | 71 | 12/12/2024 |