Tolitech.Application.Mail 1.0.0-preview.4

This is a prerelease version of Tolitech.Application.Mail.
dotnet add package Tolitech.Application.Mail --version 1.0.0-preview.4
                    
NuGet\Install-Package Tolitech.Application.Mail -Version 1.0.0-preview.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Tolitech.Application.Mail" Version="1.0.0-preview.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Tolitech.Application.Mail" Version="1.0.0-preview.4" />
                    
Directory.Packages.props
<PackageReference Include="Tolitech.Application.Mail" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Tolitech.Application.Mail --version 1.0.0-preview.4
                    
#r "nuget: Tolitech.Application.Mail, 1.0.0-preview.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Tolitech.Application.Mail@1.0.0-preview.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Tolitech.Application.Mail&version=1.0.0-preview.4&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Tolitech.Application.Mail&version=1.0.0-preview.4&prerelease
                    
Install as a Cake Tool

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

  1. Reference Tolitech.Application.Mail in your project.
  2. Implement the IEmailServiceBase interface in your infrastructure layer.
  3. Inject your implementation into your application services.
  4. 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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