PosInformatique.Foundations.Emailing.Azure 1.0.0

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package PosInformatique.Foundations.Emailing.Azure --version 1.0.0
                    
NuGet\Install-Package PosInformatique.Foundations.Emailing.Azure -Version 1.0.0
                    
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="PosInformatique.Foundations.Emailing.Azure" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PosInformatique.Foundations.Emailing.Azure" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="PosInformatique.Foundations.Emailing.Azure" />
                    
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 PosInformatique.Foundations.Emailing.Azure --version 1.0.0
                    
#r "nuget: PosInformatique.Foundations.Emailing.Azure, 1.0.0"
                    
#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 PosInformatique.Foundations.Emailing.Azure@1.0.0
                    
#: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=PosInformatique.Foundations.Emailing.Azure&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=PosInformatique.Foundations.Emailing.Azure&version=1.0.0
                    
Install as a Cake Tool

PosInformatique.Foundations.Emailing.Azure

NuGet version NuGet downloads

Introduction

PosInformatique.Foundations.Emailing.Azure provides an IEmailProvider implementation for PosInformatique.Foundations.Emailing based on the EmailClient from Azure.Communication.Email.

It allows you to send templated emails (created via IEmailManager) using Azure Communication Service.

Install

You can install the package from NuGet:

dotnet add package PosInformatique.Foundations.Emailing.Azure

Features

  • IEmailProvider implementation using Azure.Communication.Email.EmailClient.
  • Simple configuration through AddEmailing().UseAzureCommunicationService(...).
  • Supports configuration via:
    • Azure Communication Service connection string, or
    • Azure Communication Service endpoint URI.
  • Callback to configure EmailClient / EmailClientOptions:
    • Authentication (managed identity, connection string, etc.).
    • Retry policy, logging, diagnostics, and other Azure client options.

Basic configuration

Using connection string

using Microsoft.Extensions.DependencyInjection;
using PosInformatique.Foundations.EmailAddresses;

var services = new ServiceCollection();

// Your ACS connection string
var acsConnectionString = configuration["AzureCommunicationService:ConnectionString"];

services
    .AddEmailing(options =>
    {
        options.SenderEmailAddress = EmailAddress.Parse("no-reply@myapp.com");

        // Register your templates here...
        // options.RegisterTemplate(EmailTemplateIdentifiers.Invitation, invitationTemplate);
    })
    .UseAzureCommunicationService(acsConnectionString);

Using endpoint URI and Azure identity (managed identity)

You can also configure the provider using the ACS endpoint URI, and configure authentication (for example with managed identity) and client options using the clientBuilder parameter.

using Azure.Communication.Email;
using Azure.Identity;
using Microsoft.Extensions.Azure;
using Microsoft.Extensions.DependencyInjection;

var services = new ServiceCollection();

var acsEndpoint = new Uri(configuration["AzureCommunicationService:Endpoint"]);

services
    .AddEmailing(options =>
    {
        options.SenderEmailAddress = EmailAddress.Parse("no-reply@myapp.com");

        // Register your templates here...
    })
    .UseAzureCommunicationService(
        acsEndpoint,
        clientBuilder =>
        {
            // Configure EmailClient and EmailClientOptions here

            clientBuilder.ConfigureOptions((EmailClientOptions options) =>
            {
                // Example: configure retry, diagnostics, etc.
                options.Retry.MaxRetries = 5;
            });

            // Example: use managed identity for authentication
            clientBuilder.WithCredential(new DefaultAzureCredential());
        });

Typical usage end-to-end

  1. Configure emailing and templates with AddEmailing(...).
  2. Configure the Azure provider using UseAzureCommunicationService(...).
  3. Inject IEmailManager and create an email from a template identifier.
  4. Add recipients and models.
  5. Call SendAsync(...) to send via Azure Communication Service.
Product 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 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.

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
1.1.0-rc.2 52 1/26/2026
1.1.0-rc.1 65 1/23/2026
1.0.0 469 11/19/2025
1.0.0-rc.4 365 11/19/2025
1.0.0-rc.3 376 11/18/2025
1.0.0-rc.2 371 11/18/2025
1.0.0-rc.1 371 11/18/2025

1.0.0
 - Initial release with Azure Communication Service Emailing provider.