RCommon.Emailing
2.4.1
See the version list below for details.
dotnet add package RCommon.Emailing --version 2.4.1
NuGet\Install-Package RCommon.Emailing -Version 2.4.1
<PackageReference Include="RCommon.Emailing" Version="2.4.1" />
<PackageVersion Include="RCommon.Emailing" Version="2.4.1" />
<PackageReference Include="RCommon.Emailing" />
paket add RCommon.Emailing --version 2.4.1
#r "nuget: RCommon.Emailing, 2.4.1"
#:package RCommon.Emailing@2.4.1
#addin nuget:?package=RCommon.Emailing&version=2.4.1
#tool nuget:?package=RCommon.Emailing&version=2.4.1
RCommon.Emailing
An email service abstraction for .NET with a built-in SMTP implementation, designed to integrate with the RCommon dependency injection builder pattern.
Features
IEmailServiceabstraction for sending email viaSystem.Net.Mail.MailMessage- Synchronous and asynchronous send methods
- Built-in SMTP implementation (
SmtpEmailService) usingSystem.Net.Mail.SmtpClient - Configurable SMTP settings including host, port, SSL, credentials, and default sender
EmailSentevent for post-send notifications- Fluent DI registration through the
AddRCommon()builder
Installation
dotnet add package RCommon.Emailing
Usage
using RCommon;
services.AddRCommon()
.WithSmtpEmailServices(settings =>
{
settings.Host = "smtp.example.com";
settings.Port = 587;
settings.EnableSsl = true;
settings.UserName = "user@example.com";
settings.Password = "password";
settings.FromEmailDefault = "noreply@example.com";
settings.FromNameDefault = "My Application";
});
Then inject and use IEmailService:
using RCommon.Emailing;
using System.Net.Mail;
public class NotificationService
{
private readonly IEmailService _emailService;
public NotificationService(IEmailService emailService)
{
_emailService = emailService;
}
public async Task SendWelcomeEmailAsync(string toAddress)
{
var message = new MailMessage("noreply@example.com", toAddress)
{
Subject = "Welcome!",
Body = "<h1>Welcome to our app</h1>",
IsBodyHtml = true
};
await _emailService.SendEmailAsync(message);
}
}
Key Types
| Type | Description |
|---|---|
IEmailService |
Abstraction for sending email with sync and async methods |
SmtpEmailService |
SMTP-based implementation using System.Net.Mail.SmtpClient |
SmtpEmailSettings |
Configuration for SMTP host, port, SSL, credentials, and default sender |
EmailEventArgs |
Event args carrying the MailMessage after a successful send |
EmailingBuilderExtensions |
Provides WithSmtpEmailServices() for the RCommon builder |
Documentation
For full documentation, visit rcommon.com.
Related Packages
- RCommon.SendGrid - SendGrid implementation of
IEmailService - RCommon.Core - Core abstractions and builder infrastructure
License
Licensed under the Apache License, Version 2.0.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. 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 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
- RCommon.Core (>= 2.4.1)
-
net8.0
- RCommon.Core (>= 2.4.1)
-
net9.0
- RCommon.Core (>= 2.4.1)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on RCommon.Emailing:
| Package | Downloads |
|---|---|
|
RCommon.SendGrid
A cohesive set of infrastructure libraries for dotnet that utilizes abstractions for event handling, persistence, unit of work, mediator, distributed messaging, event bus, CQRS, email, and more |
|
|
RCommon.Emailing.SendGrid
A cohesive set of .NET 7 infrastructure libraries that utilizes abstractions for persistence, unit of work/transactions, distributed events, distributed transactions, and more. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.4.2-alpha.0.5 | 0 | 3/24/2026 |
| 2.4.2-alpha.0.1 | 0 | 3/24/2026 |
| 2.4.1 | 109 | 2/18/2026 |
| 2.3.2-alpha.0.3 | 51 | 2/18/2026 |
| 2.3.2-alpha.0.2 | 47 | 2/18/2026 |
| 2.3.2-alpha.0.1 | 56 | 2/9/2026 |
| 2.3.1 | 172 | 2/5/2026 |
| 2.3.0 | 112 | 2/3/2026 |
| 2.2.2-alpha.0.1 | 395 | 12/11/2025 |
| 2.2.1-alpha.0.2 | 140 | 10/24/2025 |
| 2.2.1-alpha.0.1 | 137 | 10/24/2025 |
| 2.1.11-alpha.0.2 | 141 | 10/24/2025 |
| 2.1.11-alpha.0.1 | 111 | 7/18/2025 |
| 2.1.10 | 295 | 7/17/2025 |
| 2.1.9-alpha.0.1 | 153 | 7/17/2025 |
| 2.1.2.4 | 237 | 5/21/2025 |
| 2.1.2.3 | 234 | 5/1/2025 |
| 2.1.2.2 | 493 | 1/23/2025 |
| 2.1.2.1 | 163 | 1/17/2025 |
| 0.0.0-alpha.0 | 146 | 7/17/2025 |