Adliance.AspNetCore.Buddy.Email.AzureCommunicationServices 8.0.0.6

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.6                
NuGet\Install-Package Adliance.AspNetCore.Buddy.Email.AzureCommunicationServices -Version 8.0.0.6                
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.6" />                
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.6                
#r "nuget: Adliance.AspNetCore.Buddy.Email.AzureCommunicationServices, 8.0.0.6"                
#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.6

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

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("E-Mail"),
      Configuration.GetSection("Azure-Communication-Email"))    
  //...
 }

Configuration (appsettings.json)

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

{
  "E-Mail": {
    "SenderName": "unused (always taken from config in Azure)",
    "SenderAddress": "sender@example.com",
    "ReplyToAddress": "reply@example.com",
    "RedirectAllEmailsTo": "",
    "Disable": false
  },
  "Azure-Communication-Email": {
    "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.11 1,898 7/24/2024
8.0.0.10 100 7/24/2024
8.0.0.9 576 7/2/2024
8.0.0.8 105 7/2/2024
8.0.0.7 88 5/28/2024
8.0.0.6 103 4/11/2024
8.0.0.5 132 3/15/2024