IBeam.Communications.Email.AzureCommunications
2.6.0
dotnet add package IBeam.Communications.Email.AzureCommunications --version 2.6.0
NuGet\Install-Package IBeam.Communications.Email.AzureCommunications -Version 2.6.0
<PackageReference Include="IBeam.Communications.Email.AzureCommunications" Version="2.6.0" />
<PackageVersion Include="IBeam.Communications.Email.AzureCommunications" Version="2.6.0" />
<PackageReference Include="IBeam.Communications.Email.AzureCommunications" />
paket add IBeam.Communications.Email.AzureCommunications --version 2.6.0
#r "nuget: IBeam.Communications.Email.AzureCommunications, 2.6.0"
#:package IBeam.Communications.Email.AzureCommunications@2.6.0
#addin nuget:?package=IBeam.Communications.Email.AzureCommunications&version=2.6.0
#tool nuget:?package=IBeam.Communications.Email.AzureCommunications&version=2.6.0
IBeam.Communications.Email.AzureCommunications
IBeam.Communications.Email.AzureCommunications implements IBeam email delivery through Azure Communication Services Email. It lets application services depend on IEmailService while this provider handles Azure-specific connection setup, submission, validation, and provider exception translation.
When To Use This
- You use Azure Communication Services as your production email provider.
- You want domain services to stay independent of the Azure SDK.
- You want Azure request/provider failures translated into IBeam communication exceptions.
- You want one email provider registration that can be swapped without changing service code.
What This Package Contains
| Area | Type(s) | Purpose |
|---|---|---|
| Email provider | AzureCommunicationsEmailService |
Sends EmailMessage through Azure.Communication.Email.EmailClient. |
| Provider options | AzureCommunicationsEmailOptions |
Holds the ACS connection string. |
| Connection validation | AzureCommunicationsConnectionStringValidator |
Validates ACS connection string shape before startup completes. |
| DI registration | AddIBeamAzureCommunicationsEmail(IConfiguration) |
Registers provider options and IEmailService. |
| Error translation | EmailProviderException, EmailConfigurationException |
Surfaces friendly provider/configuration failures to consuming services. |
Architecture Fit
API <-- DTO/model object --> Service <-- Entity --> Repository
This package is a provider implementation. It should sit behind services that call IEmailService. It should not contain business rules, API response logic, tenant authorization, or persistence logic.
Quick Start
using IBeam.Communications.Abstractions;
using IBeam.Communications.Email.AzureCommunications;
builder.Services.AddIBeamCommunications(builder.Configuration);
builder.Services.AddIBeamAzureCommunicationsEmail(builder.Configuration);
Configuration:
{
"IBeam": {
"Communications": {
"Email": {
"FromAddress": "DoNotReply@contoso.com",
"FromName": "Contoso"
}
}
}
}
{
"IBeam": {
"Communications": {
"Email": {
"Providers": {
"AzureCommunications": {
"ConnectionString": "endpoint=https://example.communication.azure.com/;accesskey=..."
}
}
}
}
}
}
Send an email:
public sealed class ReceiptService
{
private readonly IEmailService _email;
public ReceiptService(IEmailService email)
{
_email = email;
}
public Task SendReceiptAsync(string to, CancellationToken ct = default)
{
var message = new EmailMessage
{
Subject = "Your receipt",
HtmlBody = "<p>Thanks for your purchase.</p>",
TextBody = "Thanks for your purchase."
};
message.To.Add(to);
return _email.SendAsync(message, ct: ct);
}
}
Configuration
| Setting | Default | Purpose |
|---|---|---|
IBeam:Communications:Email:Providers:AzureCommunications:ConnectionString |
required | Azure Communication Services connection string. |
IBeam:Communications:Email:FromAddress |
required by shared defaults | Default sender address resolved by shared sender policy. |
IBeam:Communications:Email:FromName |
null |
Optional sender display name for shared defaults. |
The provider connection string must look like:
endpoint=https://<resource>.communication.azure.com/;accesskey=<key>
Service Operations, Auditing, And Permissions
This provider does not own audit or permission decisions. The consuming service that decides to send the email should be tagged and wrapped.
[IBeamOperation("billing.receipt.send")]
public Task SendReceiptAsync(Guid tenantId, Guid receiptId, CancellationToken ct = default)
=> _operations.ExecuteAsync(
this,
token => SendReceiptCoreAsync(tenantId, receiptId, token),
new ServiceOperationExecutionOptions
{
TenantId = tenantId,
EntityId = receiptId
},
ct);
Keep Azure provider code focused on delivery mechanics. Put business decisions, permission rules, and audit boundaries in the service layer that calls IEmailService.
Data Storage
This package does not create tables or durable stores.
| Storage Item | Created By This Package | Notes |
|---|---|---|
| Azure Table Storage tables | No | No schema is owned by this provider. |
| Email outbox | No | Add a consuming-service outbox if durable retries are required. |
| Azure Communication Services resource | No | The ACS resource is provisioned outside this package. |
Extension Points
| Extension Point | Interface | Why Replace It |
|---|---|---|
| Email provider | IEmailService |
Swap ACS for SMTP, SendGrid, pickup directory, or a custom provider. |
| Sender defaults | EmailOptions |
Override sender address/name per message or per call. |
| Provider error handling | Catch EmailProviderException in service/API boundary |
Add retry, alerting, or user-safe error translation. |
Package Relationships
| Package | Relationship |
|---|---|
IBeam.Communications |
Provides IEmailService, EmailMessage, EmailOptions, validation, and exceptions. |
IBeam.Communications.Email.AzureCommunications |
Implements Azure Communication Services email delivery. |
IBeam.Communications.Email.Templating |
Optional template rendering before sending through this provider. |
Extended Examples And Agent Guidance
- Project agent prompt:
.agent/prompt.md - Repository implementation guide:
../.agent/implementation-guide.md - Consuming API migration prompt:
../IBeam.AI.Enablement/examples/consuming-api-migration-prompt.md
Troubleshooting
| Problem | Likely Cause | Fix |
|---|---|---|
| Startup validation fails | Missing or malformed ACS connection string | Configure IBeam:Communications:Email:Providers:AzureCommunications:ConnectionString. |
| ACS rejects sender | Sender address/domain is not configured in ACS | Verify the sender/domain in Azure Communication Services. |
EmailProviderException with 401/403 |
Invalid key or resource authorization problem | Rotate the connection string or check ACS access. |
EmailProviderException with 429/5xx |
Provider throttling or temporary failure | Retry from the consuming service/outbox if needed. |
| No audit row is written | Provider sends are not business operations | Wrap the consuming service method with IServiceOperationExecutor. |
Version Notes
- Targets
net10.0. - Uses
Azure.Communication.Email. - Package version is assigned by the repository release workflow.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- Azure.Communication.Email (>= 1.1.0)
- IBeam.Communications (>= 2.6.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.3)
- Microsoft.Extensions.Options (>= 10.0.3)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on IBeam.Communications.Email.AzureCommunications:
| Package | Downloads |
|---|---|
|
IBeam.Identity.Api
IBeam modular framework components for .NET APIs and services. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.6.0 | 0 | 7/20/2026 |
| 2.5.0 | 46 | 7/17/2026 |
| 2.4.2 | 46 | 7/16/2026 |
| 2.4.1 | 74 | 7/14/2026 |
| 2.4.0 | 117 | 6/24/2026 |
| 2.3.0 | 117 | 6/24/2026 |
| 2.2.0 | 122 | 6/23/2026 |
| 2.1.0 | 129 | 6/23/2026 |
| 2.0.68 | 116 | 6/23/2026 |
| 2.0.66 | 121 | 6/22/2026 |
| 2.0.65 | 109 | 6/22/2026 |
| 2.0.64 | 168 | 6/17/2026 |
| 2.0.63 | 119 | 6/16/2026 |
| 2.0.62 | 120 | 6/16/2026 |
| 2.0.57 | 218 | 6/8/2026 |
| 2.0.56 | 130 | 6/7/2026 |
| 2.0.54 | 268 | 5/27/2026 |
| 2.0.52 | 114 | 5/27/2026 |
| 2.0.35 | 148 | 5/15/2026 |
| 2.0.32 | 287 | 3/25/2026 |