Adliance.AspNetCore.Buddy.Email.AzureCommunicationServices 8.0.0.12

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Adliance.AspNetCore.Buddy.Email.AzureCommunicationServices --version 8.0.0.12                
NuGet\Install-Package Adliance.AspNetCore.Buddy.Email.AzureCommunicationServices -Version 8.0.0.12                
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="Adliance.AspNetCore.Buddy.Email.AzureCommunicationServices" Version="8.0.0.12" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Adliance.AspNetCore.Buddy.Email.AzureCommunicationServices --version 8.0.0.12                
#r "nuget: Adliance.AspNetCore.Buddy.Email.AzureCommunicationServices, 8.0.0.12"                
#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.
// Install Adliance.AspNetCore.Buddy.Email.AzureCommunicationServices as a Cake Addin
#addin nuget:?package=Adliance.AspNetCore.Buddy.Email.AzureCommunicationServices&version=8.0.0.12

// Install Adliance.AspNetCore.Buddy.Email.AzureCommunicationServices as a Cake Tool
#tool nuget:?package=Adliance.AspNetCore.Buddy.Email.AzureCommunicationServices&version=8.0.0.12                

Adliance.AspNetCore.Buddy.Email.AzureCommunicationServices

The Azure Communication Buddy makes sending E-Mail easy. Find more detailed information on the Azure website.

Setup library in an ASP.NET project

The IBuddyServiceCollection of the Adliance.AspNetCore.Buddy.Abstractions package offers the AddBuddy method, which provides AddAzureCommunicationEmail extensions to add the E-Mail services.

using Adliance.AspNetCore.Buddy.Email.AzureCommunicationServices;

// ...

public void ConfigureServices(IServiceCollection services)
{
  //...
  services.AddBuddy()
    .AddAzureCommunicationEmail(Configuration.GetSection("Email"),
      Configuration.GetSection("AzureCommunicationEmail"))    
  //...
 }

Configuration (appsettings.json)

Add a section in the configuration of your project and add following configuration:

{
  "Email": {
    "SenderName": "unused (always taken from config in Azure)",
    "SenderAddress": "sender@example.com",
    "ReplyToAddress": "reply@example.com",
    "RedirectAllEmailsTo": "",
    "Disable": false
  },
  "AzureCommunicationEmail": {
    "Endpoint": "https://<your-communication-service-name>.<region>.communication.azure.com/",
    "AccessKey": "your-access-key",
    "UserEngagementTrackingDisabled": false
  }
}

Look up your API credentials in your Azure portal.

Usage of library

This code sample shows the usage of the Azure Communication email client. Just call the Send method providing a recipient, subject and a body.

IEmailer emailer = new AzureCommunicationEmailer(azureCommunicationConfig, emailConfig);
await emailer.Send(recipientAddress,
            "Descriptive subject line",
            "This is the <b>HTML</b> body.",
            "This is the **Text** body.");
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. 
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
8.0.0.14 67 12/18/2024
8.0.0.13 77 12/16/2024
8.0.0.12 61 12/16/2024
8.0.0.11 2,321 7/24/2024
8.0.0.10 108 7/24/2024
8.0.0.9 582 7/2/2024
8.0.0.8 113 7/2/2024
8.0.0.7 96 5/28/2024
8.0.0.6 109 4/11/2024
8.0.0.5 139 3/15/2024